cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/2] git commit: updated refs/heads/master to e4e685b
Date Sat, 28 Nov 2015 21:25:21 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 39a4a9d19 -> e4e685b29


ui: Fix undefined check in instances.js, regression from 459d638

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0bbd9a06
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0bbd9a06
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0bbd9a06

Branch: refs/heads/master
Commit: 0bbd9a06a97f4e7a0e85cc0f9f015811effad23a
Parents: 5b8fc22
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
Authored: Wed Nov 25 14:17:32 2015 +0530
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Wed Nov 25 14:17:32 2015 +0530

----------------------------------------------------------------------
 ui/scripts/instances.js | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0bbd9a06/ui/scripts/instances.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js
index 9d63751..416c77c 100644
--- a/ui/scripts/instances.js
+++ b/ui/scripts/instances.js
@@ -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
                         });


Mime
View raw message