Skip to content

Some functions resolve before they are complete #70

@IS-KPL

Description

@IS-KPL

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.
multipleresolves

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

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