kuestess / homebridge-platform-insteonlocal

Homebridge platform plugin for local Insteon control
Other
76 stars 26 forks source link

Exception thrown when I delete Links #291

Open btgh opened 1 year ago

btgh commented 1 year ago

If I try to delete a link to an old device on a switch or a 2413U PLM I get the following error in the UI and log:

ReferenceError: Cannot access 'deviceID' before initialization at InsteonUI.handleRequest (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/src/insteon-ui.ts:2914:21) at Layer.handle [as handle_request] (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/index.js:328:13) at /var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/index.js:286:9 at Function.process_params (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/index.js:346:12) at next (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/index.js:280:10) at expressInit (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/middleware/init.js:40:5) at Layer.handle [as handle_request] (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/index.js:328:13) at /var/lib/homebridge/node_modules/homebridge-platform-insteonlocal/node_modules/express/lib/router/index.js:286:9

kuestess commented 1 year ago

Thanks @btgh - easy fix, I missed a keyword. Will probably bundle this with some other fixes and push out in a few days.

kuestess commented 1 year ago

@btgh This should be fixed in 0.5.8.