From 10569b57a36f2cecdeb21f886c2830d39082cb23 Mon Sep 17 00:00:00 2001 From: Milos Dukic <97025173+milos-dukic@users.noreply.github.com> Date: Mon, 15 Sep 2025 16:24:27 +0200 Subject: [PATCH] Update app/javascript/controllers/notifications_controller.js Co-authored-by: Chris Oliver --- app/javascript/controllers/notifications_controller.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/javascript/controllers/notifications_controller.js b/app/javascript/controllers/notifications_controller.js index e585f70..3ce53a5 100644 --- a/app/javascript/controllers/notifications_controller.js +++ b/app/javascript/controllers/notifications_controller.js @@ -60,8 +60,7 @@ export default class extends Controller { } get #serviceWorkerRegistration() { - const hostAndProtocol = window.location.protocol + '//' + window.location.host; - return navigator.serviceWorker.getRegistration(hostAndProtocol) + return navigator.serviceWorker.getRegistration(window.location.origin) } #registerServiceWorker() {