From: Darren Date: Mon, 4 Aug 2014 15:57:31 +0000 (+0100) Subject: Don't create error messages when there is no error X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b64b9395eb323e44fd692df41f749d4961eb7efb;p=KiwiIRC.git Don't create error messages when there is no error --- diff --git a/client/src/misc/clientuicommands.js b/client/src/misc/clientuicommands.js index e20b387..d6fdc5b 100644 --- a/client/src/misc/clientuicommands.js +++ b/client/src/misc/clientuicommands.js @@ -587,10 +587,11 @@ ssl: ssl, password: password }, function(err, new_connection) { - var translated_err_text = {text: translateText('client_models_application_connection_error', [server, port.toString(), err.toString()])}; + var translated_err; if (err) { - that.app.panels().active.addMsg('', styleText('server_connecting_error', translated_err_text)); + translated_err = translateText('client_models_application_connection_error', [server, port.toString(), err.toString()]); + that.app.panels().active.addMsg('', styleText('server_connecting_error', {text: translated_err})); } }); }