From fa696adc79bf5daaaa48618202344a1ebeac8732 Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 16 Jun 2015 17:57:03 +0200 Subject: [PATCH] Quick fix so history doesn't break when media is playing. --- data/interfaces/default/history.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/data/interfaces/default/history.html b/data/interfaces/default/history.html index 0117a62d..3556326e 100644 --- a/data/interfaces/default/history.html +++ b/data/interfaces/default/history.html @@ -193,14 +193,22 @@ "targets": [8], "data":"stopped", "render": function ( data, type, full ) { - return moment(data, "X").format("${time_format}"); + if (data !== null) { + return moment(data, "X").format("${time_format}"); + } else { + return data; + } } }, { "targets": [9], "data":"duration", "render": function ( data, type, full ) { - return Math.round(moment.duration(data, 'seconds').as('minutes')) + ' mins'; + if (data !== null) { + return Math.round(moment.duration(data, 'seconds').as('minutes')) + ' mins'; + } else { + return data; + } } }, {