From 8f484ad5be0099e9a7fcc7b2d61d4b7ee35b9aa8 Mon Sep 17 00:00:00 2001 From: "Jonathan Leibiusky @xetorthio" Date: Wed, 1 Nov 2017 14:14:37 -0300 Subject: [PATCH] Make sure instance exists before trying to change it's ports --- www/assets/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/www/assets/app.js b/www/assets/app.js index 7314e4f..523e983 100644 --- a/www/assets/app.js +++ b/www/assets/app.js @@ -320,8 +320,10 @@ }); socket.on('instance docker ports', function(status) { - $scope.idx[status.instance].ports = status.ports; - $scope.$apply(); + if ($scope.idx[status.instance]) { + $scope.idx[status.instance].ports = status.ports; + $scope.$apply(); + } }); socket.on('instance docker swarm ports', function(status) {