FIX Don't silently unset ParentID in "add page" dialog

Happened when changing the page type, because the "selectedNode"
property isn't set in all cases
This commit is contained in:
Ingo Schommer 2013-03-25 23:40:35 +01:00
parent 0a283eacb8
commit 3f2b6a518f

View File

@ -161,7 +161,9 @@
}
// Set parent node (fallback to root)
this.find(':input[name=ParentID]').val(selectedNode ? selectedNode.data('id') : 0);
if(selectedNode.length) {
this.find(':input[name=ParentID]').val(selectedNode ? selectedNode.data('id') : 0);
}
}
});
});