
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))
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
finallycall 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: