You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var promisify = require("promisify-node");
class C {
constructor() {
this.promisified_connect = promisify(this.connect);
}
connect(done) {
if (done) {
done();
} else {
return this.promisified_connect();
}
}
}
var c = new C()
promisify-node throws this error:
TypeError: Cannot read property '1' of null
at module.exports (./node_modules/promisify-node/utils/args.js:9:63)
at processExports (./node_modules/promisify-node/index.js:61:29)
at module.exports (./node_modules/promisify-node/index.js:164:10)
Then re-running the above test code produced another error:
TypeError: Cannot convert undefined or null to object
at processExports (./node_modules/promisify-node/index.js:86:16)
at module.exports (./node_modules/promisify-node/index.js:164:10)
at new C (repl:3:28)
version 0.4.0
node v6.9.1
When I enter this code in the node REPL:
promisify-node throws this error:
so I updated the RegExp in https://github.com/nodegit/promisify-node/blob/master/utils/args.js#L9 from:
to:
Then re-running the above test code produced another error:
I was able to get past this by modifying https://github.com/nodegit/promisify-node/blob/master/index.js#L86 to guard the checking of the keys of the prototype to:
I believe there are likely other changes required.
The text was updated successfully, but these errors were encountered: