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
This commit is contained in:
Sam Atkins 2024-05-01 11:39:46 +01:00
parent 33785b3786
commit ca65ed1258

View File

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