From 95f58dbbdc669ec5bb996b5a74294d75a6e786af Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Mon, 30 Mar 2020 20:28:04 +0200 Subject: [PATCH] UI bug fix: Cannot deploy VM from ISO (#3995) --- ui/scripts/instanceWizard.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js index a6fdfbb3b95..e85ab298a06 100644 --- a/ui/scripts/instanceWizard.js +++ b/ui/scripts/instanceWizard.js @@ -960,14 +960,16 @@ } }); - $.ajax({ - url: createURL("listTemplateOvfProperties&id=" + selectedTemplateObj.id), - dataType: "json", - async: false, - success: function(json) { - ovfProps = json.listtemplateovfpropertiesresponse.ovfproperty; - } - }); + if (selectedTemplateObj) { + $.ajax({ + url: createURL("listTemplateOvfProperties&id=" + selectedTemplateObj.id), + dataType: "json", + async: false, + success: function(json) { + ovfProps = json.listtemplateovfpropertiesresponse.ovfproperty; + } + }); + } var $step = $('.step.sshkeyPairs:visible'); if (ovfProps == null || ovfProps.length === 0) {