Skip to content

Commit

Permalink
Edge Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
josephliccini committed Jul 10, 2018
1 parent 1185983 commit 2fb80c9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/workbox-core/_private/DBWrapper.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,12 @@ class DBWrapper {
const target = opts.index ? store.index(opts.index) : store;
const results = [];

target.openCursor(opts.query, opts.direction).onsuccess = (evt) => {
// Passing `undefined` arguments to Edge's `openCursor(...)` causes
// 'DOMException: DataError'
// Details in issue: https://github.com/GoogleChrome/workbox/issues/1509
const query = opts.query || null;
const direction = opts.direction || 'next';
target.openCursor(query, direction).onsuccess = (evt) => {
const cursor = evt.target.result;
if (cursor) {
const {primaryKey, key, value} = cursor;
Expand Down

0 comments on commit 2fb80c9

Please sign in to comment.