refactor: return result of fn when wrapping in utils.shimIndexDB
This commit is contained in:
parent
da65e06e3c
commit
d6b29226aa
|
@ -52,11 +52,13 @@ function shimIndexedDB(fn) {
|
||||||
global.indexedDB = require('fake-indexeddb');
|
global.indexedDB = require('fake-indexeddb');
|
||||||
}
|
}
|
||||||
|
|
||||||
fn();
|
var result = fn();
|
||||||
|
|
||||||
if(addShim) {
|
if(addShim) {
|
||||||
delete global.indexedDB;
|
delete global.indexedDB;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function setup(callback) {
|
function setup(callback) {
|
||||||
|
|
Loading…
Reference in New Issue