Skip to content

Commit

Permalink
fix(dates): add proper default arg for human-friendly-date
Browse files Browse the repository at this point in the history
  • Loading branch information
abeforgit committed Jan 26, 2023
1 parent 0730ac3 commit c387c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/human-friendly-date.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function getDateFnsLocale(locale) {
return locales[locale] ?? locales[locale.substring(0, 2)];
}

export default function humanFriendlyDate(date, { locale = 'nl-BE' }) {
export default function humanFriendlyDate(date, { locale = 'nl-BE' } = {}) {
if (!(date instanceof Date)) return '';
try {
return formatRelative(date, new Date(), {
Expand Down

0 comments on commit c387c59

Please sign in to comment.