refactor: return result of fn when wrapping in utils.shimIndexDB

This commit is contained in:
bcheidemann 2021-03-07 15:02:29 +00:00
parent da65e06e3c
commit d6b29226aa
1 changed files with 3 additions and 1 deletions

View File

@ -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) {