Closed polizinha closed 7 years ago
It's throwing up that error because you're calling suspend.resume()
without having yielded.
Try replacing this line:
var available = Modulus.checkModulus(company, 'advanced_config', suspend.resume());
...with this:
var available = yield Modulus.checkModulus(company, 'advanced_config', suspend.resume());
.
Oh... Shame on me =/ It works! Thanks!
if your problem is solved kindly close the ticket
Closing this issue, as it seems that it's been resolved since March. :)
Hello, I'm using suspend.resume() to receive node cb style, but I'm obtain "Generators cannot be resumed once completed." error. Can u help me?
suspend(function* () {
var available = Modulus.checkModulus(company, 'advanced_config', suspend.resume());
if (available) { console.log('YEY');}
})();
In another file:
var checkModulus = function (company, modulus, callback) {
return callback(null, true);
};
Thanks in advance!