From 7974204af3cc931335f04becb1029c39d268afde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Mon, 19 Sep 2016 10:11:14 +0200 Subject: [PATCH] Fix time format if no date is present --- js/connection.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/js/connection.js b/js/connection.js index 2570a63..4c74347 100644 --- a/js/connection.js +++ b/js/connection.js @@ -159,13 +159,13 @@ weechat.factory('connection', } // if there is a date, assemble it in the right order - if (date_components.length > 0) { - date_components.sort(); - var format_array = []; - for (var i = 0; i < date_components.length; i++) { - if (date_components[i][0] == -1) continue; - format_array.push(date_components[i][1]); - } + date_components.sort(); + var format_array = []; + for (var i = 0; i < date_components.length; i++) { + if (date_components[i][0] == -1) continue; + format_array.push(date_components[i][1]); + } + if (format_array.length > 0) { // TODO: parse delimiter as well? For now, use '/' as it is // more common internationally than '-' var date_format = format_array.join(_timeDelimiter("/"));