mirror of https://github.com/apache/cloudstack.git
Merge pull request #1119 from shapeblue/master-instancesjsfix
[master] ui: Fix undefined check in instances.js, regression from 459d638(fix is already included in the https://github.com/apache/cloudstack/pull/1106 for 4.6 as well)
* pr/1119:
ui: Fix undefined check in instances.js, regression from 459d638
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
commit
e4e685b291
|
|
@ -397,11 +397,13 @@
|
|||
data: data,
|
||||
success: function(json) {
|
||||
var items = json.listvirtualmachinesresponse.virtualmachine;
|
||||
$.each(items, function(idx, vm) {
|
||||
if (vm.nic && vm.nic.length > 0 && vm.nic[0].ipaddress) {
|
||||
items[idx].ipaddress = vm.nic[0].ipaddress;
|
||||
}
|
||||
});
|
||||
if (items) {
|
||||
$.each(items, function(idx, vm) {
|
||||
if (vm.nic && vm.nic.length > 0 && vm.nic[0].ipaddress) {
|
||||
items[idx].ipaddress = vm.nic[0].ipaddress;
|
||||
}
|
||||
});
|
||||
}
|
||||
args.response.success({
|
||||
data: items
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue