Villhellm / custom-sidebar

Custom Sidebar for Home Assistant
115 stars 23 forks source link

Uncaught TypeError: Cannot read property 'length' of null #22

Closed u8915055 closed 3 years ago

u8915055 commented 3 years ago

Hello, I am running home assistant 0.115.2 (latest release) and am using custom-sidebar. I have manually loaded it. It seems to be working but I keep getting this error in the logs:

http://localhost:8123/local/custom-sidebar.js:62:22 Uncaught TypeError: Cannot read property 'length' of null

My config file is this:

order:
  - item: overview
    hide: false
  - item: dashboard
  - item: routines
  - item: history
  - item: sensors
  - item: layout
  - item: logbook
    hide: false
  - new_item: true
    item: Integrations
    href: /config/integrations
    icon: "mdi:server"
    bottom: true
  - item: developer tools
    bottom: true
  - item: configuration
    bottom: true

Again, it seems to be working but not sure why this message would be coming up.

Thank you very much. Great module.

Villhellm commented 3 years ago

What version of the plugin are you using?

u8915055 commented 3 years ago

My apologies, I had installed the latest version from github before testing to see if message was still there. I am not using HACS and have manuallly installed it. Plus, you'll see some unique item names, those are custom lovelace dashboards I created, again they are working. Thank you.

Villhellm commented 3 years ago

It seems like you didn't clear your cache after manually updating. line 62 has nothing to do with the length of anything, so you shouldn't be getting that specific error on the latest release

Villhellm commented 3 years ago

I suggest using HACS in the future as it will take care of cache issues like this.

u8915055 commented 3 years ago

Nice call on that.. Cleared cache and issue went away. Sorry to have taken your time on this. Thanks again.

Villhellm commented 3 years ago

No worries 👍