MortJC / homebridge-platform-orbit

Orbit Irrigation System platform plugin for HomeBridge
MIT License
34 stars 5 forks source link

Platform fails to load if email is not specified #4

Closed codyc1515 closed 4 years ago

codyc1515 commented 4 years ago

You will receive the following on Homebridge startup if no platform config entry is present.

[12/28/2019, 22:51:05] TypeError: Cannot read property 'email' of null
    at new PlatformOrbit (/usr/lib/node_modules/homebridge-platform-orbit/platform.js:11:24)
    at Server._loadDynamicPlatforms (/usr/lib/node_modules/homebridge/lib/server.js:358:30)
    at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:92:8)
    at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:59:10)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32)
    at Function.Module._load (internal/modules/cjs/loader.js:727:14)
    at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
    at internal/main/run_main_module.js:17:11
codyc1515 commented 4 years ago

This is the specific line: https://github.com/MortJC/homebridge-platform-orbit/blob/bb96c025998409df3f5d0581b1f1b1668af21210/platform.js#L11

Suggest to add a check here for this: https://github.com/MortJC/homebridge-platform-orbit/blob/bb96c025998409df3f5d0581b1f1b1668af21210/platform.js#L16

MortJC commented 4 years ago

Thanks, I've added a check.

On Sat, Dec 28, 2019 at 8:54 PM codyc1515 notifications@github.com wrote:

This is the specific line: https://github.com/MortJC/homebridge-platform-orbit/blob/bb96c025998409df3f5d0581b1f1b1668af21210/platform.js#L11

Suggest to add a check here for this: https://github.com/MortJC/homebridge-platform-orbit/blob/bb96c025998409df3f5d0581b1f1b1668af21210/platform.js#L16

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/MortJC/homebridge-platform-orbit/issues/4?email_source=notifications&email_token=AN5E4TTKXQNUUTK5KYDDY3TQ24O33A5CNFSM4KAKAXRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYGNKI#issuecomment-569403049, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN5E4TTHGZAQOWMTAMCRNXDQ24O33ANCNFSM4KAKAXRA .