mirror of
https://github.com/45Drives/cockpit-navigator.git
synced 2025-07-29 16:45:13 +02:00
ensure path at least contains ""
This commit is contained in:
parent
fa77701794
commit
09e56e58fb
@ -69,7 +69,7 @@ class NavEntry {
|
|||||||
if (typeof path == "string")
|
if (typeof path == "string")
|
||||||
this.path = path.split("/").splice(1);
|
this.path = path.split("/").splice(1);
|
||||||
else
|
else
|
||||||
this.path = path;
|
this.path = (path.length) ? path : [""];
|
||||||
this.dom_element = document.createElement("div");
|
this.dom_element = document.createElement("div");
|
||||||
this.dom_element.classList.add("nav-item");
|
this.dom_element.classList.add("nav-item");
|
||||||
let icon = this.dom_element.nav_item_icon = document.createElement("i");
|
let icon = this.dom_element.nav_item_icon = document.createElement("i");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user