mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-550:Getting TypeError: items is undefined error in UI when we click on Instances tab while no instances are launched yet:Handling the null case for items
This commit is contained in:
parent
2149b82b36
commit
ed5bd846e8
@ -203,6 +203,7 @@
|
||||
data: data,
|
||||
success: function(json) {
|
||||
var items = json.listvirtualmachinesresponse.virtualmachine;
|
||||
if(items != null) {
|
||||
var i=0;
|
||||
for( i=0;i< items.length;i++){
|
||||
if(items[i].state == 'Expunging')
|
||||
@ -217,6 +218,15 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
args.response.success({
|
||||
actionFilter: vmActionfilter,
|
||||
data: items
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user