Villhellm / custom-sidebar

Custom Sidebar for Home Assistant
115 stars 23 forks source link

Getting an error in the HA log - custom-sidebar.js, undefined is not an object #27

Open bitwon opened 3 years ago

bitwon commented 3 years ago

Getting the following error in the HA log:

hacsfiles/custom-sidebar/custom-sidebar.js:160:46 TypeError: undefined is not an object (evaluating 'getConfigurationElement(elements).cloneNode')

The code in the custom-sidebar.js is the following: function createItem(elements, item) { var cln = getConfigurationElement(elements).cloneNode(true); if (cln) { cln.querySelector("paper-icon-item").querySelector("ha-icon").setAttribute("icon", item.icon); cln.querySelector("paper-icon-item").querySelector("span").innerHTML = item.item; cln.href = item.href; cln.setAttribute("data-panel", item.item); elements.insertBefore(cln, elements.children[0]); } }

Installed version is 0.2.2, HA OS 2020.12.1.

Best Regards

Claw256 commented 3 years ago

I am getting this error as well.

bsfaxi commented 2 years ago

me too. :)