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:
Vincent Logozzo 2019-01-31 15:40:09 -05:00 committed by David Humphrey
parent 7e46fcde8f
commit 43bba422d9
1 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,8 @@
var Filer = require('../../src');
'use strict';
var needsCleanup = [];
const Filer = require('../../src');
let needsCleanup = [];
if(global.addEventListener) {
global.addEventListener('beforeunload', function() {
needsCleanup.forEach(function(f) { f(); });
@ -8,8 +10,8 @@ if(global.addEventListener) {
}
function IndexedDBTestProvider(name) {
var _done = false;
var that = this;
let _done = false;
let that = this;
function cleanup(callback) {
callback = callback || function(){};
@ -31,12 +33,12 @@ function IndexedDBTestProvider(name) {
that.provider.db.close();
}
var indexedDB = global.indexedDB ||
const indexedDB = global.indexedDB ||
global.mozIndexedDB ||
global.webkitIndexedDB ||
global.msIndexedDB;
var request = indexedDB.deleteDatabase(name);
let request = indexedDB.deleteDatabase(name);
request.onsuccess = finished;
request.onerror = finished;
} catch(e) {