From b64b9395eb323e44fd692df41f749d4961eb7efb Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 4 Aug 2014 16:57:31 +0100 Subject: [PATCH] Don't create error messages when there is no error --- client/src/misc/clientuicommands.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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})); } }); } -- 2.25.1