From 9e5c98dd07844e33e7bc0a08db1d3f2da03c4118 Mon Sep 17 00:00:00 2001 From: James Allen Date: Thu, 1 Feb 2018 16:52:43 +0000 Subject: [PATCH] Use local references to variable --- .../public/coffee/ide/connection/ConnectionManager.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/web/public/coffee/ide/connection/ConnectionManager.coffee b/services/web/public/coffee/ide/connection/ConnectionManager.coffee index d996184e49..d33abaf112 100644 --- a/services/web/public/coffee/ide/connection/ConnectionManager.coffee +++ b/services/web/public/coffee/ide/connection/ConnectionManager.coffee @@ -13,7 +13,7 @@ define [], () -> console.error "Socket.io javascript not loaded. Please check that the real-time service is running and accessible." @ide.socket = on: () -> - $scope.$apply () => + @$scope.$apply () => @$scope.state.error = "Could not connect to websocket server :(" return @@ -100,7 +100,7 @@ define [], () -> @ide.socket.on "connect_failed", () => @connected = false - $scope.$apply () => + @$scope.$apply () => @$scope.state.error = "Unable to connect, please view the connection problems guide to fix the issue." # We can get a "disconnect" event at any point after the @@ -114,7 +114,7 @@ define [], () -> @$scope.$apply () => @$scope.connection.reconnecting = false - if !$scope.connection.forced_disconnect and !@userIsInactive and !@gracefullyReconnecting + if !@$scope.connection.forced_disconnect and !@userIsInactive and !@gracefullyReconnecting @startAutoReconnectCountdown() # Site administrators can send the forceDisconnect event to all users