File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -757,14 +757,18 @@ index 622bb7889b..66dd4b0bbc 100644
757
757
758
758
self.addEventListener('message', event => {
759
759
diff --git a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts
760
- index dfda6a1cfb..44a01fb0fb 100644
760
+ index dfda6a1cfb..9bd1aa3e64 100644
761
761
--- a/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts
762
762
+++ b/src/vs/workbench/contrib/resources/browser/resourceServiceWorkerClient.ts
763
- @@ -24,7 +24,7 @@ const _serviceWorker = new class ServiceWorkerStarter {
763
+ @@ -24,7 +24,11 @@ const _serviceWorker = new class ServiceWorkerStarter {
764
764
private _messageHandler?: (event: ExtendableMessageEvent) => void;
765
765
766
766
constructor() {
767
767
- navigator.serviceWorker.register(ServiceWorkerStarter._url, { scope: '/' }).then(reg => {
768
+ + if (!navigator.serviceWorker) {
769
+ + console.warn('Service workers are not enabled.');
770
+ + return;
771
+ + }
768
772
+ navigator.serviceWorker.register(ServiceWorkerStarter._url, { scope: window.location.pathname.replace(/\/+$/, '') }).then(reg => {
769
773
// console.debug('SW#reg', reg);
770
774
return reg.update();
You can’t perform that action at this time.
0 commit comments