[pve-devel] [PATCH manager] fix nodeselector when no element in the tree is selected
Dominik Csapak
d.csapak at proxmox.com
Fri Aug 18 09:04:53 CEST 2017
it can happen that nothing in the tree is selected,
then PVE.curSelectedNode is undefined, generating an exception there.
so we check if this is available
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/form/NodeSelector.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/manager6/form/NodeSelector.js b/www/manager6/form/NodeSelector.js
index 0cc60bf7..6fcced37 100644
--- a/www/manager6/form/NodeSelector.js
+++ b/www/manager6/form/NodeSelector.js
@@ -94,7 +94,7 @@ Ext.define('PVE.form.NodeSelector', {
initComponent: function() {
var me = this;
- if (me.selectCurNode && PVE.curSelectedNode.data.node) {
+ if (me.selectCurNode && PVE.curSelectedNode && PVE.curSelectedNode.data.node) {
me.preferredValue = PVE.curSelectedNode.data.node;
}
--
2.11.0
More information about the pve-devel
mailing list