Ensure we have a ParentID before trying to limit children by page type (fixes #1273)

This commit is contained in:
Loz Calver 2015-09-03 14:41:05 +01:00
parent 147181e96f
commit 94697e1281

View File

@ -52,7 +52,7 @@
? (parentTree.getValue() || this.getParentID()) ? (parentTree.getValue() || this.getParentID())
: null, : null,
newClassName = metadata ? metadata.ClassName : null, newClassName = metadata ? metadata.ClassName : null,
hintKey = (newClassName && parentMode === 'child') hintKey = (newClassName && parentMode === 'child' && id)
? newClassName ? newClassName
: 'Root', : 'Root',
hint = (typeof hints[hintKey] !== 'undefined') ? hints[hintKey] : null, hint = (typeof hints[hintKey] !== 'undefined') ? hints[hintKey] : null,