From ee4b26a7d7d24712c6a1214388137b1374a65cae Mon Sep 17 00:00:00 2001 From: Curtis Ekstrom Date: Thu, 14 Apr 2016 13:02:25 +0200 Subject: [PATCH] Remove moment deprecation on builds page See https://github.com/moment/moment/issues/1407 for more details. All that was needed was to manually instantiate a new Date() object --- app/helpers/pretty-date.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/pretty-date.js b/app/helpers/pretty-date.js index 0f977651..bbdc79a0 100644 --- a/app/helpers/pretty-date.js +++ b/app/helpers/pretty-date.js @@ -2,5 +2,6 @@ import { timeAgoInWords, safe } from 'travis/utils/helpers'; import Ember from "ember"; export default Ember.Helper.helper(function(params) { - return safe(moment(params[0]).format('MMMM D, YYYY H:mm:ss') || '-'); + let date = new Date(params[0]); + return safe(moment(date).format('MMMM D, YYYY H:mm:ss') || '-'); });