Skip to content

Commit f972fc9

Browse files
authored
Merge pull request #94 from maoberlehner/master
Prevent syntax error in Internet Explorer
2 parents 0316175 + 6ef28f1 commit f972fc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

template/build/service-worker-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Check to make sure service workers are supported in the current browser,
55
// and that the current page is accessed from a secure origin. Using a
66
// service worker from an insecure origin will trigger JS console errors.
7-
const isLocalhost = Boolean(window.location.hostname === 'localhost' ||
7+
var isLocalhost = Boolean(window.location.hostname === 'localhost' ||
88
// [::1] is the IPv6 localhost address.
99
window.location.hostname === '[::1]' ||
1010
// 127.0.0.1/8 is considered localhost for IPv4.
@@ -26,7 +26,7 @@
2626
// i.e. whether there's an existing service worker.
2727
if (navigator.serviceWorker.controller) {
2828
// The updatefound event implies that registration.installing is set
29-
const installingWorker = registration.installing;
29+
var installingWorker = registration.installing;
3030

3131
installingWorker.onstatechange = function() {
3232
switch (installingWorker.state) {

0 commit comments

Comments
 (0)