Commit 8edfbe3d authored by Tim Zallmann's avatar Tim Zallmann

Fixed problem when element in main menu is not there (specs)

parent 07f6c1b8
......@@ -49,7 +49,8 @@ export default {
eventHub.$on(`${this.namespace}-dropdownOpen`, this.dropdownOpenHandler);
// As we init it through requestIdleCallback it could be that the dropdown is already open
if (document.getElementById(`nav-${this.namespace}-dropdown`).classList.contains('show')) {
const namespaceDropdown = document.getElementById(`nav-${this.namespace}-dropdown`);
if (namespaceDropdown && namespaceDropdown.classList.contains('show')) {
this.dropdownOpenHandler();
}
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment