FIX: don't break the site when adding a navigation item without a 'name' field
This commit is contained in:
parent
9aa49e922c
commit
125cc356f3
|
@ -539,9 +539,13 @@ class PluginApi {
|
||||||
* })
|
* })
|
||||||
*/
|
*/
|
||||||
addNavigationBarItem(item) {
|
addNavigationBarItem(item) {
|
||||||
|
if (!item["name"]) {
|
||||||
|
console.warn("A 'name' is required when adding a Navigation Bar Item.", item);
|
||||||
|
} else {
|
||||||
addNavItem(item);
|
addNavItem(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let _pluginv01;
|
let _pluginv01;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue