Update README.md

This commit is contained in:
Tony Air 2020-04-02 07:23:45 +07:00 committed by GitHub
parent db8bb88bbc
commit 0ef7b8eb06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ composer require a2nt/silverstripe-progressivewebapp
if ('serviceWorker' in navigator) {
var baseHref = (document.getElementsByTagName('base')[0] || {}).href;
if(baseHref){
navigator.serviceWorker.register(baseHref + 'service-worker.js').then(function() {
navigator.serviceWorker.register(baseHref + 'sw.js').then(function() {
console.log('Service Worker Registered');
});
}