Fix new page SiteTree nesting

This commit is contained in:
David Craig 2015-06-23 16:53:38 +12:00
parent 13df9c4163
commit f6745a3feb

View File

@ -250,7 +250,7 @@
*/
createNode: function(html, data, callback) {
var self = this,
parentNode = data.ParentID ? self.getNodeByID(data.ParentID) : false,
parentNode = data.ParentID !== void 0 ? self.getNodeByID(data.ParentID) : false, // Explicitly check for undefined as 0 is a valid ParentID
newNode = $(html);
// Extract the state for the new node from the properties taken from the provided HTML template.