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
v4 changed the returned function to an arrow function from a regular one. I cannot come up with a good reason to do that, since it breaks promisifying prototypes. The prototype function cannot be bound beforehand and the arrow function forces lexical this (which is undefined). util.promisify was our workaround, since this case doesn't need the extra options of pify..
E.g. there is no way to promisify node-redis multi queries now:
// Async multi exec
redis.Multi.prototype.execAsync = pify(redis.Multi.prototype.exec);
const client = new redis.createClient(...);
// Use
const cmds = [...];
const res = await client.multi(cmds).execAsync();
// Boom: Cannot read property 'queue' of undefined
The text was updated successfully, but these errors were encountered:
v4 changed the returned function to an arrow function from a regular one. I cannot come up with a good reason to do that, since it breaks promisifying prototypes. The prototype function cannot be bound beforehand and the arrow function forces lexical
this
(which isundefined
).util.promisify
was our workaround, since this case doesn't need the extra options ofpify
..E.g. there is no way to promisify
node-redis
multi queries now:The text was updated successfully, but these errors were encountered: