Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

ES6 promises not working #43

@bouncehead13

Description

@bouncehead13

I'm currently using ES6 with my Angular 1.5.X code. The promise button library is failing to resolve the promises because of this code block.

mVal.finally(function() {
    promiseDone = true;
    handleLoadingFinished(btnEl);
});

mVal.finally is not a function with native ES6 promises. I noticed in your angular 2 version, you check for finally and then have a fallback.

if (promise.finally) {
    promise.finally(resolveLoadingState);
} else {
    promise
        .then(resolveLoadingState)
        .catch(resolveLoadingState);
}

Is it possible to have this approach included into this repo as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions