From ca65ed1258937fd7b4a49721335138612a0382ef Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 1 May 2024 11:39:46 +0100 Subject: [PATCH] chore: Use `this` to refer to itemWatchCallbackFunctions field Solves these eslint issues: /puter/packages/puter-js/src/modules/UI.js 418:20 error 'itemWatchCallbackFunctions' is not defined no-undef 418:74 error 'itemWatchCallbackFunctions' is not defined no-undef 419:21 error 'itemWatchCallbackFunctions' is not defined no-undef --- packages/puter-js/src/modules/UI.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/puter-js/src/modules/UI.js b/packages/puter-js/src/modules/UI.js index 03501313..a8bf3c62 100644 --- a/packages/puter-js/src/modules/UI.js +++ b/packages/puter-js/src/modules/UI.js @@ -415,8 +415,8 @@ class UI extends EventListener { // Item Watch response else if(e.data.msg === "itemChanged" && e.data.data && e.data.data.uid){ //excute callback - if(itemWatchCallbackFunctions[e.data.data.uid] && typeof itemWatchCallbackFunctions[e.data.data.uid] === 'function') - itemWatchCallbackFunctions[e.data.data.uid](e.data.data); + if(this.itemWatchCallbackFunctions[e.data.data.uid] && typeof this.itemWatchCallbackFunctions[e.data.data.uid] === 'function') + this.itemWatchCallbackFunctions[e.data.data.uid](e.data.data); } // Broadcasts else if (e.data.msg === 'broadcast') {