Skip to content

Commit

Permalink
fixed Issue-689 indexedDB.js (#700)
Browse files Browse the repository at this point in the history
* CRLF replaced with LF

* package changes to run tests

* updated local varriables to use let and const instead of var

* reverted dependency changes
  • Loading branch information
vlogozzo authored and humphd committed Jan 31, 2019
1 parent 7e46fcd commit 43bba42
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/lib/indexeddb.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
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(); });
});
}

function IndexedDBTestProvider(name) {
var _done = false;
var that = this;
let _done = false;
let that = this;

function cleanup(callback) {
callback = callback || function(){};
Expand All @@ -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) {
Expand Down

0 comments on commit 43bba42

Please sign in to comment.