From 7d81318d231d3d2dd8cb515cbbfb813de1dea0fb Mon Sep 17 00:00:00 2001 From: Maximilian Bala Date: Sun, 17 Apr 2022 23:51:52 +0100 Subject: [PATCH] fix namespacing --- frontend/gfx-script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/gfx-script.js b/frontend/gfx-script.js index b1b93d0..9be1e08 100644 --- a/frontend/gfx-script.js +++ b/frontend/gfx-script.js @@ -1,4 +1,5 @@ let previousState = 'HIDDEN' +const namespace = 'module-league-runes' const updateUi = data => { console.log(data); @@ -77,7 +78,7 @@ const updateUi = data => { const tick = async () => { const data = await this.LPTE.request({ meta: { - namespace: 'rcv-rune-gfx', + namespace, type: 'request', version: 1 } @@ -90,7 +91,7 @@ window.LPTE.onready(() => { setTimeout(tick, 100) // setInterval(tick, 1000) - window.LPTE.on('rcv-rune-gfx', 'update', data => { + window.LPTE.on(namespace, 'update', data => { const timeout = previousState === 'HIDDEN' ? 1 : 1000 updateUi(data.state) setTimeout(() => updateUi(data.state), timeout)