From 66e86d8f80af7caad7f6efc68310f3a31c918fdc Mon Sep 17 00:00:00 2001 From: Ben Gotow Date: Mon, 11 Apr 2016 16:17:51 -0700 Subject: [PATCH] fix(timestamps): Don't crash on null times #1929 --- src/flux/models/utils.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flux/models/utils.coffee b/src/flux/models/utils.coffee index dd1d174bd..65e528641 100644 --- a/src/flux/models/utils.coffee +++ b/src/flux/models/utils.coffee @@ -56,6 +56,7 @@ Utils = timeZone: tz shortTimeString: (time) -> + return "" unless time diff = moment().diff(time, 'days', true) if diff <= 1 format = "h:mm a" @@ -66,6 +67,7 @@ Utils = moment(time).format(format) fullTimeString: (time) -> + return "" unless time moment(time).tz(Utils.timeZone).format("dddd, MMMM Do YYYY, h:mm:ss a z") fastOmit: (props, without) ->