diff --git a/dist/helpers/generic-helpers.js b/dist/helpers/generic-helpers.js index f919816..52d7445 100644 --- a/dist/helpers/generic-helpers.js +++ b/dist/helpers/generic-helpers.js @@ -44,18 +44,14 @@ Generic template helper definitions for HackMyResume / FluentCV. @method formatDate */ formatDate: function(datetime, format, fallback) { - var momentDate, ref, ref1; + var momentDate; if (moment) { momentDate = moment(datetime); if (momentDate.isValid()) { return momentDate.format(format); } } - return datetime || ((ref = typeof fallback === 'string') != null ? ref : { - fallback: (ref1 = fallback === true) != null ? ref1 : { - 'Present': null - } - }); + return datetime || (typeof fallback === 'string' ? fallback : (fallback === true ? 'Present' : null)); }, /** diff --git a/src/helpers/generic-helpers.coffee b/src/helpers/generic-helpers.coffee index 337b4d7..2ac41ab 100644 --- a/src/helpers/generic-helpers.coffee +++ b/src/helpers/generic-helpers.coffee @@ -37,7 +37,10 @@ GenericHelpers = module.exports = momentDate = moment datetime return momentDate.format(format) if momentDate.isValid() - datetime || (typeof fallback == 'string' ? fallback : (fallback == true ? 'Present' : null)); + datetime || + if typeof fallback == 'string' + then fallback + else (if fallback == true then 'Present' else null)