From 6366629205bb841707e5a5ddd1984a94c3e4d45f Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 17 Aug 2015 08:39:23 +0200 Subject: [PATCH] Improved humanTime helper method. --- app/assets/javascripts/app/index.js.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/index.js.coffee b/app/assets/javascripts/app/index.js.coffee index c7ea196c3..602831265 100644 --- a/app/assets/javascripts/app/index.js.coffee +++ b/app/assets/javascripts/app/index.js.coffee @@ -109,10 +109,11 @@ class App extends Spine.Controller isHtmlEscape = true timestamp = App.i18n.translateTimestamp(result) escalation = false - if attribute_config.class && attribute_config.class.match 'escalation' + cssClass = attribute_config.class || '' + if cssClass.match 'escalation' escalation = true humanTime = App.PrettyDate.humanTime(result, escalation) - result = "" + result = "" if !isHtmlEscape && typeof result is 'string' result = App.Utils.htmlEscape(result)