Merge pull request #4341 from flashbackzoo/pulls/add-page-nesting

Fix new page SiteTree nesting
This commit is contained in:
Damian Mooyman 2015-06-23 17:32:22 +12:00
commit 3e1c156411

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.