-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Description
Hey
When using the library I noticed that "clear()" in the angular2-indexeddb.ts has multiple resolve() as seen in the picture. From what I have read and experienced, the lower one results in the promise resolving before the clear() is actually complete. I assume this was not intentional as I can see only some functions in the file have this setup, so I thought I would bring it to your attention.

Furthermore onsuccess is not the same as complete, depending on the data being handled, onsuccess can finish way before complete(relatively speaking as it is still in microseconds). This means anything that should resolve the promise, should resolve in the "complete" callback of the transaction instead
Metadata
Metadata
Assignees
Labels
No labels