]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Hide colon if status text is empty
authorAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 4 Aug 2018 09:39:31 +0000 (12:39 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Sat, 4 Aug 2018 09:39:31 +0000 (12:39 +0300)
interface/js/app/rspamd.js

index 7ca11ae74af76586647bdf0840cf2ccaf4015761..c703d936723d2967368f608854e5315b6da8965a 100644 (file)
@@ -208,7 +208,8 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config,
                 neighbours_status[ind].checked = true;
                 function errorMessage() {
                     alertMessage("alert-error", neighbours_status[ind].name + " > " +
-                        ((o.errorMessage) ? o.errorMessage : "Request failed") + ": " + errorThrown);
+                        (o.errorMessage ? o.errorMessage : "Request failed") +
+                        (errorThrown ? (": " + errorThrown) : ""));
                 }
                 if (o.error) {
                     o.error(neighbours_status[ind],