dist/js/idbhelper.js
/**
   * Check if idb restaurants index exists
   */
Check if idb restaurants index exists
Check if idb restaurants index exists
static databaseExists(dbname, callback) {
    var req = indexedDB.open(dbname);
    var existed = true;
    req.onsuccess = function () {
      req.result.close();
      if (!existed) indexedDB.deleteDatabase(dbname);
      callback(existed);
    };
    req.onupgradeneeded = function () {
      existed = false;
    };
  }
static databaseExists ( dbname , callback ) { var req = indexedDB . open ( dbname ) ; var existed = true ; req . onsuccess = function ( ) { req . result . close ( ) ; if ( ! existed ) indexedDB . deleteDatabase ( dbname ) ; callback ( existed ) ; } ; req . onupgradeneeded = function ( ) { existed = false ; } ; }
Check if idb restaurants index exists
Check if idb restaurants index exists