summaryrefslogtreecommitdiff
path: root/src/serviceWorker.js
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2022-08-29 09:52:34 +0300
committerYuval Adam <_@yuv.al>2022-08-29 09:52:49 +0300
commit998b5cda31aa14a443861568edfc113065d660bb (patch)
tree6aff0700e96d5ddef3be9a9158594c8f98310bb4 /src/serviceWorker.js
parent544b1b1f57755491130864ed71e3cf0ae985b66f (diff)
Copy over template from new react scripts project
Diffstat (limited to 'src/serviceWorker.js')
-rw-r--r--src/serviceWorker.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/serviceWorker.js b/src/serviceWorker.js
index 2283ff9..85daadc 100644
--- a/src/serviceWorker.js
+++ b/src/serviceWorker.js
@@ -12,12 +12,12 @@
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
- // [::1] is the IPv6 localhost address.
- window.location.hostname === '[::1]' ||
- // 127.0.0.1/8 is considered localhost for IPv4.
- window.location.hostname.match(
- /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
- )
+ // [::1] is the IPv6 localhost address.
+ window.location.hostname === '[::1]' ||
+ // 127.0.0.1/8 is considered localhost for IPv4.
+ window.location.hostname.match(
+ /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
+ )
);
export function register(config) {
@@ -43,7 +43,7 @@ export function register(config) {
navigator.serviceWorker.ready.then(() => {
console.log(
'This web app is being served cache-first by a service ' +
- 'worker. To learn more, visit http://bit.ly/CRA-PWA'
+ 'worker. To learn more, visit http://bit.ly/CRA-PWA'
);
});
} else {
@@ -71,7 +71,7 @@ function registerValidSW(swUrl, config) {
// content until all client tabs are closed.
console.log(
'New content is available and will be used when all ' +
- 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'
+ 'tabs for this page are closed. See http://bit.ly/CRA-PWA.'
);
// Execute callback