From d7eb4646054a4d539b5ea2fc134a66374f1848ee Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 4 May 2016 18:01:20 +0000 Subject: [PATCH] Hide unit label if there is no value --- api/js/etemplate/et2_widget_date.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/js/etemplate/et2_widget_date.js b/api/js/etemplate/et2_widget_date.js index 0a0ed0b7b6..56c92262a8 100644 --- a/api/js/etemplate/et2_widget_date.js +++ b/api/js/etemplate/et2_widget_date.js @@ -794,7 +794,7 @@ var et2_date_duration = (function(){ "use strict"; return et2_date.extend( } else { - this.format.text(this.time_formats[display.unit]); + this.format.text(display.unit ? this.time_formats[display.unit] : ''); } } },