mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-04-09 14:37:47 +09:00
[ServiceWorler fix] - Failed to get a ServiceWorkerRegistration error.
This commit is contained in:
@@ -60,7 +60,8 @@ export default class extends Controller {
|
||||
}
|
||||
|
||||
get #serviceWorkerRegistration() {
|
||||
return navigator.serviceWorker.getRegistration(window.location.host)
|
||||
const hostAndProtocol = window.location.protocol + '//' + window.location.host;
|
||||
return navigator.serviceWorker.getRegistration(hostAndProtocol)
|
||||
}
|
||||
|
||||
#registerServiceWorker() {
|
||||
|
||||
Reference in New Issue
Block a user