mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
dont crash if item is undefined
This commit is contained in:
@@ -10,8 +10,11 @@
|
||||
var helpers = {};
|
||||
|
||||
helpers.displayMenuItem = function(data, index) {
|
||||
var item = data.navigation[index],
|
||||
properties = item.properties;
|
||||
var item = data.navigation[index];
|
||||
if (!item) {
|
||||
return false;
|
||||
}
|
||||
var properties = item.properties;
|
||||
|
||||
if (properties) {
|
||||
if ((properties.loggedIn && !data.config.loggedIn) ||
|
||||
|
||||
Reference in New Issue
Block a user