Skip to content

Empty __browserfs_test__ indexedDB database is not deleted #317

@jcubic

Description

@jcubic

If you use browserFS you end up with two indexedDB databases one is empty and it looks like debug code.
It's because of the code that tests if indexedDB is supported:

  public static isAvailable(): boolean {
    // In Safari's private browsing mode, indexedDB.open returns NULL.
    // In Firefox, it throws an exception.
    // In Chrome, it "just works", and clears the database when you leave the page.
    // Untested: Opera, IE.
    try {
      return typeof indexedDB !== 'undefined' && null !== indexedDB.open("__browserfs_test__");
    } catch (e) {
      return false;
    }
  }

The library should clean up after itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions