Skip to content

Commit

Permalink
Remove onblock errors
Browse files Browse the repository at this point in the history
  • Loading branch information
philipwalton committed Nov 1, 2017
1 parent 656cc95 commit dab83ca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const storage = {}; // Root storage.
// Make a new request.
// Set default handlers to ensure errors aren't masked by spotty implementations.
const request = new IDBOpenDBRequest(name, version);
request.onblocked = () => { throw new Error('IDBOpenDBRequest: Open database request was blocked because other connections could not be closed'); };
// Removed due to: https://github.com/dhoulb/shelving-mock-indexeddb/issues/3
// request.onblocked = () => { throw new Error('IDBOpenDBRequest: Open database request was blocked because other connections could not be closed'); };
return request;
}

Expand All @@ -38,7 +39,8 @@ const storage = {}; // Root storage.
// Make a new request.
// Set default handlers to ensure errors aren't masked by spotty implementations.
const request = new IDBOpenDBRequest(name, false);
request.onblocked = () => { throw new Error('IDBOpenDBRequest: Open database request was blocked because other connections could not be closed'); };
// Removed due to: https://github.com/dhoulb/shelving-mock-indexeddb/issues/3
// request.onblocked = () => { throw new Error('IDBOpenDBRequest: Open database request was blocked because other connections could not be closed'); };
return request;
}
}
Expand Down

0 comments on commit dab83ca

Please sign in to comment.