Skip to content

Description of .tap() method is not accurate #466

@puncha

Description

@puncha

This is a document defect. I don't think tap() equals to the following codes:

// Using only .then()
promise.then(function(x) {
    doSideEffectsHere(x);
    return x;
});

Actually, based on my understanding, it equals to :

promise.then(function(x) {
    when(doSideEffectsHere(x)).then(function(){x;});
});

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