Skip to content

Commit 72a9b94

Browse files
authored
tests/browser.worker: parse query string w/ URLSearchParams (#8781)
1 parent 105b735 commit 72a9b94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/integration/browser.worker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ describe.skip('browser.worker.js', function () {
1717
before(function () {
1818
worker = new Worker('worker.js');
1919

20-
var sourceFile = window && window.location.search.match(/[?&]sourceFile=([^&]+)/);
20+
let sourceFile = window && new URLSearchParams(window.location.search).get('sourceFile');
2121

2222
if (!sourceFile) {
2323
sourceFile = '../../packages/node_modules/pouchdb/dist/pouchdb.js';
2424
} else {
25-
sourceFile = '../../packages/node_modules/pouchdb/dist/' + sourceFile[1];
25+
sourceFile = '../../packages/node_modules/pouchdb/dist/' + sourceFile;
2626
}
2727

2828
worker.postMessage(['source', sourceFile]);

0 commit comments

Comments
 (0)