Skip to content

Commit

Permalink
add a fallback for Chrome dev tools strange behavior, close zloirock#186
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock authored and loklaan committed Jun 13, 2016
1 parent 280a87d commit 007f9bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/modules/$.iter-detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(exec, skipClosing){
try {
var arr = [7]
, iter = arr[ITERATOR]();
iter.next = function(){ safe = true; };
iter.next = function(){ return {done: safe = true}; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
Expand Down
2 changes: 1 addition & 1 deletion modules/$.iter-detect.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function(exec, skipClosing){
try {
var arr = [7]
, iter = arr[ITERATOR]();
iter.next = function(){ safe = true; };
iter.next = function(){ return {done: safe = true}; };
arr[ITERATOR] = function(){ return iter; };
exec(arr);
} catch(e){ /* empty */ }
Expand Down

0 comments on commit 007f9bc

Please sign in to comment.