1
0
mirror of https://github.com/JuanCanham/HackMyResume.git synced 2025-05-02 20:37:08 +01:00

Fix glitch in converted CoffeeScript.

Replace naked ternary with if then else.
This commit is contained in:
hacksalot
2016-02-09 10:41:48 -05:00
parent 7c0a9bcc02
commit e191af1fb0
2 changed files with 6 additions and 7 deletions

View File

@ -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));
},
/**