From 37b2b01e02c987f8c839d04eda7038d4018af68c Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 14 Sep 2016 12:15:20 -0700 Subject: [PATCH] small fix to disconnect function--null pointer exception --- awx/ui/client/src/shared/socket/socket.service.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awx/ui/client/src/shared/socket/socket.service.js b/awx/ui/client/src/shared/socket/socket.service.js index 1d14d72b69..da53e2998a 100644 --- a/awx/ui/client/src/shared/socket/socket.service.js +++ b/awx/ui/client/src/shared/socket/socket.service.js @@ -79,7 +79,9 @@ export default }, 2000); }, disconnect: function(){ - this.socket.close(); + if(this.socket){ + this.socket.close(); + } }, subscribe: function(state){ console.log("Next state: " + state.name);