Skip to content

Commit

Permalink
fixed service-worker issue
Browse files Browse the repository at this point in the history
  • Loading branch information
naresh verma committed Apr 7, 2022
1 parent b55732e commit f0e45fb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion publishable/pwa/firebase-messaging-sw.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');

firebase.initializeApp({messagingSenderId: "{{core()->getConfigData('pwa.settings.push-notification.messaging-id')}}"}");
firebase.initializeApp({messagingSenderId: "{{core()->getConfigData('pwa.settings.push-notification.messaging-id')}}"});

const messaging = firebase.messaging();

Expand Down
4 changes: 2 additions & 2 deletions publishable/pwa/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ function formFilter(response) {

// Give the service worker access to Firebase Messaging.
// Note that you can only use Firebase Messaging here, other Firebase libraries are not available in the service worker.
importScripts('http://www.gstatic.com/firebasejs/4.8.1/firebase-app.js');
importScripts('http://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/4.8.1/firebase-messaging.js');

const firebaseConfig = {
apiKey: "{{core()->getConfigData('pwa.settings.push-notification.web-api-key')}}",
Expand Down

0 comments on commit f0e45fb

Please sign in to comment.