From 1a5b6d4839d77a8b118b03f453fdbd6de169fa3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 5 May 2016 21:01:15 +0300 Subject: [PATCH] backport crash fix --- public/src/modules/helpers.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.js index fda87711fb..7250fab3b6 100644 --- a/public/src/modules/helpers.js +++ b/public/src/modules/helpers.js @@ -103,7 +103,9 @@ helpers.generateChildrenCategories = function(category) { var html = ''; var relative_path = (typeof config !== 'undefined' ? config.relative_path : require('nconf').get('relative_path')); - + if (!category || !category.children) { + return html; + } category.children.forEach(function(child) { if (!child) { return;