Skip to content

setItem call does not return an angular promise but an ES6 promise #149

@jeremyaurelius

Description

@jeremyaurelius

Screen Shot 2019-04-02 at 2 29 23 pm

As per the screenshot above, the setItem call returns an ES6 promise instead of an angular promise. This is usually not a problem, unless you plan to use the finally call on the promise, in which case you get an error.

For the sake of consistency, we should wrap the ES6 promise inside an angular promise like so:

return $q.resolve(self._localforage.setItem(self.prefix() + key, localCopy))

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions