Skip to content

Once Dexie.on.close is triggered, Dexie.isOpen() is still true. #2186

@twxia

Description

@twxia

https://dexie.org/docs/Dexie/Dexie.on.close

Is it normal that when the close event is triggered, the connection is still open?

Currently, I need to call db.close() by myself in the close event and db.open() again to trigger the ready event that a middleware depends on it.

I guess we need to subscribe to close event in constructor and this.close() to prevent this issue. I can create a PR if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions