Skip to content

promisified functions are cached in an 'unpromisified' state #13

@jon-hall

Description

@jon-hall

The cache currently puts the original function in it, so when the function is seen again, instead of being promisified, the original is returned instead.

e.g.

var a = { a: function(cb) { /*...*/ cb(); } };
a.b = a.a;
promisify(a);
a.b().then(/*...*/); // ERROR: Cannot call 'then' on undefined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions