ensure path at least contains ""

This commit is contained in:
joshuaboud 2021-05-27 13:12:15 -03:00
parent fa77701794
commit 09e56e58fb
No known key found for this signature in database
GPG Key ID: 17EFB59E2A8BF50E
1 changed files with 1 additions and 1 deletions

View File

@ -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");