mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-29 12:49:06 +02:00
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:
parent
0a283eacb8
commit
3f2b6a518f
@ -161,7 +161,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set parent node (fallback to root)
|
// 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user