homebridge / homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
https://homebridge.io
MIT License
2.59k stars 369 forks source link

Fix crash with missing homepage package.json property #2013

Closed regaw-leinad closed 4 months ago

regaw-leinad commented 4 months ago

:recycle: Current situation

Currently, fetching the update release notes crashes if the plugin does not have a homepage property defined in the package.json.

testing locally against my plugin Screenshot 2024-02-21 at 12 44 14 PM

Looks to have been introduced in https://github.com/homebridge/homebridge-config-ui-x/pull/1890

:bulb: Proposed solution

Ensure plugin.links.homepage exists before attempting to use it. We short-circuit above if both homepage and bugs don't exist, but after that, we are in a state where either both exist, or just one does.

with this change, the release notes render, even without the homepage property Screenshot 2024-02-21 at 12 54 59 PM

bwp91 commented 4 months ago

Hi @regaw-leinad nice find on this, will merge into the beta branch now and a new UI beta should release within a few minutes!

thanks!