Created
March 11, 2019 07:31
-
-
Save efpapado/2ff7f351002c3bdd6b16f06ed942e0a2 to your computer and use it in GitHub Desktop.
change_sw_route.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/advanced_pwa.routing.yml b/advanced_pwa.routing.yml | |
index 178ccc7..8e3b43d 100644 | |
--- a/advanced_pwa.routing.yml | |
+++ b/advanced_pwa.routing.yml | |
@@ -73,7 +73,7 @@ advanced_pwa.subscription_list: | |
_admin_route: TRUE | |
advanced_pwa.serviceworker_file_data: | |
- path: /serviceworker-advanced_pwa.js | |
+ path: '/serviceworker-advanced_pwa_js' | |
defaults: | |
_controller: '\Drupal\advanced_pwa\Controller\AdvancedpwaController::advancedpwaServiceWorkerFileData' | |
requirements: | |
diff --git a/js/main.js b/js/main.js | |
index 1175ae8..6704311 100644 | |
--- a/js/main.js | |
+++ b/js/main.js | |
@@ -40,7 +40,7 @@ | |
// register service worker | |
if ('serviceWorker' in navigator) { | |
- navigator.serviceWorker.register('serviceworker-advanced_pwa.js', {scope: '/'}) | |
+ navigator.serviceWorker.register('serviceworker-advanced_pwa_js', {scope: '/'}) | |
.then(function (registration) { | |
// console.log('Registration successful, scope is:', registration.scope); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment