From d2d7ecec69ae346e3e62e5d7f89d17db49c8e737 Mon Sep 17 00:00:00 2001 From: Dariusz Szut Date: Wed, 20 Nov 2024 15:48:42 +0100 Subject: [PATCH] added check --- src/bundle/Resources/public/js/scripts/core/storage.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bundle/Resources/public/js/scripts/core/storage.js b/src/bundle/Resources/public/js/scripts/core/storage.js index e04448bdfd..f13fd8652a 100644 --- a/src/bundle/Resources/public/js/scripts/core/storage.js +++ b/src/bundle/Resources/public/js/scripts/core/storage.js @@ -50,7 +50,11 @@ init() { if (this.eventName) { - global.addEventListener('storage', (event) => this.fireStorageChangeEvent(event.newValue)); + global.addEventListener('storage', (event) => { + if (event.key === this.key) { + this.fireStorageChangeEvent(event.newValue); + } + }); } } }