Skip to content

Commit

Permalink
Reuse searchParams
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbvz committed Dec 9, 2021
1 parent 4dd5514 commit 7c450ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/webview/browser/pre/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ const workerReady = new Promise((resolve, reject) => {
return reject(new Error('Service Workers are not enabled. Webviews will not work. Try disabling private/incognito mode.'));
}

const swPath = `service-worker.js?vscode-resource-base-authority=${(new URL(location.toString()).searchParams).get('vscode-resource-base-authority')}`;
const swPath = `service-worker.js?vscode-resource-base-authority=${searchParams.get('vscode-resource-base-authority')}`;

navigator.serviceWorker.register(swPath).then(
async registration => {
Expand Down

0 comments on commit 7c450ab

Please sign in to comment.