Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception 'metajs.js:155 Uncaught TypeError: Cannot set property 'value' of undefined' #18

Open
slonm opened this issue Oct 15, 2016 · 0 comments

Comments

@slonm
Copy link

slonm commented Oct 15, 2016

Following code:

function* foo(){
  var index = 0;
  while(index <= 2) // при достижении 2, done в yield станет true, а value undefined;
    yield index++;
}

var iterator = foo();
console.log(iterator.next()); // { value:0, done:false }
console.log(iterator.next()); // { value:1, done:false }
console.log(iterator.next()); // { value:2, done:false }
console.log(iterator.next()); // { value:undefined, done:true }

Led to exception 'metajs.js:155 Uncaught TypeError: Cannot set property 'value' of undefined' on row
'console.log(iterator.next()); // { value:1, done:false }'

Browser: Chrome 53.0.2785.116 (64-bit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant