diff --git a/lib/client/console.js b/lib/client/console.js index 92a79499..883c3d84 100644 --- a/lib/client/console.js +++ b/lib/client/console.js @@ -54,12 +54,11 @@ var CloudCmd, Util, DOM, CloudFunc, $; // Handle a command. var handler = function(command) { - var lSocket = CloudCmd.Socket; - if (command) { + var socket = CloudCmd.Socket; + + if (command && socket) { Images.showLoad({ top:true }); - - if(lSocket) - lSocket.send(command); + socket.send(command); } jqconsole.Prompt(true, handler);