FIX: don't break the site when adding a navigation item without a 'name' field

This commit is contained in:
Régis Hanol 2017-08-07 10:45:35 +02:00
parent 9aa49e922c
commit 125cc356f3
1 changed files with 5 additions and 1 deletions

View File

@ -539,8 +539,12 @@ class PluginApi {
* })
*/
addNavigationBarItem(item) {
if (!item["name"]) {
console.warn("A 'name' is required when adding a Navigation Bar Item.", item);
} else {
addNavItem(item);
}
}
}
let _pluginv01;