From cf9ffe29bf653fa4cb21d60a6925a6a199a92dc6 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 23 May 2022 11:16:02 +0200 Subject: [PATCH] Revert "storage.js: Use substring instead of startsWith on strings" This reverts commit 22805514843424f9040ed92af86691a053d2c463. --- public/js/icinga/storage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/icinga/storage.js b/public/js/icinga/storage.js index c48aea522..fa312d291 100644 --- a/public/js/icinga/storage.js +++ b/public/js/icinga/storage.js @@ -44,7 +44,7 @@ */ window.addEventListener('storage', function(event) { var url = icinga.utils.parseUrl(event.url); - if (! url.path.substring(0, icinga.config.baseUrl.length) === icinga.config.baseUrl) { + if (! url.path.startsWith(icinga.config.baseUrl)) { // A localStorage is shared between all paths on the same origin. // So we need to make sure it's us who made a change. return;