Skip to content

Commit cb12cf9

Browse files
author
Jessica Wang
committed
CLOUDSTACK-4089: UI > zone wizard > hypervisor VMware > physical network > vmware_network_label: remove trailing comma if there is any.
1 parent b24e9a6 commit cb12cf9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎ui/scripts/zoneWizard.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@
5757
trafficLabel += trafficConfig.vSwitchType;
5858
}
5959

60-
if (trafficLabel.length == 0) //trafficLabel == ''
60+
if (trafficLabel.length == 0) { //trafficLabel == ''
6161
trafficLabel = null;
62+
} else if (trafficLabel.length >= 1) {
63+
if (trafficLabel.charAt(trafficLabel.length-1) == ',') { //if last character is comma
64+
trafficLabel = trafficLabel.substring(0, trafficLabel.length - 1); //remove the last character (which is comma)
65+
}
66+
}
6267
}
6368
}
6469

0 commit comments

Comments
 (0)