fixed Issue-689 indexedDB.js (#700)
* CRLF replaced with LF * package changes to run tests * updated local varriables to use let and const instead of var * reverted dependency changes
This commit is contained in:
parent
7e46fcde8f
commit
43bba422d9
|
@ -1,6 +1,8 @@
|
||||||
var Filer = require('../../src');
|
'use strict';
|
||||||
|
|
||||||
var needsCleanup = [];
|
const Filer = require('../../src');
|
||||||
|
|
||||||
|
let needsCleanup = [];
|
||||||
if(global.addEventListener) {
|
if(global.addEventListener) {
|
||||||
global.addEventListener('beforeunload', function() {
|
global.addEventListener('beforeunload', function() {
|
||||||
needsCleanup.forEach(function(f) { f(); });
|
needsCleanup.forEach(function(f) { f(); });
|
||||||
|
@ -8,8 +10,8 @@ if(global.addEventListener) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function IndexedDBTestProvider(name) {
|
function IndexedDBTestProvider(name) {
|
||||||
var _done = false;
|
let _done = false;
|
||||||
var that = this;
|
let that = this;
|
||||||
|
|
||||||
function cleanup(callback) {
|
function cleanup(callback) {
|
||||||
callback = callback || function(){};
|
callback = callback || function(){};
|
||||||
|
@ -31,12 +33,12 @@ function IndexedDBTestProvider(name) {
|
||||||
that.provider.db.close();
|
that.provider.db.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
var indexedDB = global.indexedDB ||
|
const indexedDB = global.indexedDB ||
|
||||||
global.mozIndexedDB ||
|
global.mozIndexedDB ||
|
||||||
global.webkitIndexedDB ||
|
global.webkitIndexedDB ||
|
||||||
global.msIndexedDB;
|
global.msIndexedDB;
|
||||||
|
|
||||||
var request = indexedDB.deleteDatabase(name);
|
let request = indexedDB.deleteDatabase(name);
|
||||||
request.onsuccess = finished;
|
request.onsuccess = finished;
|
||||||
request.onerror = finished;
|
request.onerror = finished;
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|
Loading…
Reference in New Issue