From 74b02ee0966ca9ab72ef5e56ef400efdc55670de Mon Sep 17 00:00:00 2001 From: barisusakli Date: Fri, 23 Oct 2015 16:24:02 -0400 Subject: [PATCH] dont crash if item is undefined --- public/src/modules/helpers.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index 1210b10753..a40008dfdc 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -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) ||