serviceWorker
This commit is contained in:
parent
a7d32bd4c1
commit
aac31071bf
1 changed files with 3 additions and 1 deletions
|
|
@ -28,7 +28,9 @@ export function ServiceWorkerProvider() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
const isProduction = window.location.hostname === 'basetracker.lona-development.org';
|
||||||
|
|
||||||
|
if (isProduction) {
|
||||||
registerServiceWorker();
|
registerServiceWorker();
|
||||||
} else {
|
} else {
|
||||||
navigator.serviceWorker.getRegistration(SW_PATH).then((registration) => {
|
navigator.serviceWorker.getRegistration(SW_PATH).then((registration) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue