Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fetchBla(id) {
- return new Promise(...)
- } // Do a query with given ID
- function *fetchBlas() {
- var index = 1;
- while (true)
- index++;
- yield fetchBla(index);
- }
- let blas = fetchBlas();
- blas.next().value.then(...) // Get's stuck in a loop forever .. shouldn't this return a Promise object?..
- blas.next().value.then(...) // Blow's up with .then() beeing undefined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement