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') {