-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I'm trying to use your polyfill together with co 4.0.0
But as soon as I apply the bind to the generator it will only yield undefined
co(function* () {
console.log(this); //Node global object
const result = yield Promise.resolve(true);
console.log(result); // true
return result;
});
require('generator-bind').polyfill();
co(function* () {
console.log(this); //'CONTEXT'
const result = yield Promise.resolve(true);
console.log(result); // undefined
return result;
}.bind('CONTEXT'));
Same happens when using the genBind function syntax
Am I missing something?
Metadata
Metadata
Assignees
Labels
No labels