BUGFIX check if hints are defined for given pagetype before using. Fixes #861

This commit is contained in:
Shea Dawson 2013-10-03 14:20:54 +13:00
parent 0437c0597d
commit 0d2d293c02

View File

@ -68,7 +68,7 @@
// Build a list for allowed children as submenu entries
var pagetype = node.data('pagetype'),
id = node.data('id'),
disallowedChildren = hints[pagetype].disallowedChildren,
disallowedChildren = (typeof hints[pagetype] != 'undefined') ? hints[pagetype].disallowedChildren : null,
allowedChildren = $.extend(true, {}, hints['All']), // clone
disallowedClass,
menuAllowedChildren = {},