diff --git a/src/js/terminal.js b/src/js/terminal.js index aaf46e9e5..c2dc4375c 100644 --- a/src/js/terminal.js +++ b/src/js/terminal.js @@ -1,6 +1,9 @@ 'use strict'; +/* global angular */ +/* global $ */ /* global Terminal */ +/* global RSTATES */ // create main application module var app = angular.module('Application', ['angular-md5', 'ui-notification']); @@ -126,13 +129,13 @@ app.controller('TerminalController', ['$scope', '$timeout', '$location', 'Client refreshApp(appId, function (error, result) { if (error) return callback(error); - if (result.runState === 'stopped') return callback(); + if (result.runState === RSTATES.STOPPED) return callback(); setTimeout(waitUntilStopped.bind(null, callback), 2000); }); } Client.stopApp(appId, function (error) { - if (error) return console.error('Failed to stop app.', error); + if (error) console.error('Failed to stop app.', error); waitUntilStopped(function (error) { if (error) return console.error('Failed to get app status.', error);