Skip to content

Commit

Permalink
Handle nullable dates
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasGraml11 committed Apr 12, 2024
1 parent 48fb2f8 commit bfd9092
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Component.register('nosto-grouped-view', {
},

formatDate(date) {
return (new Date(date)).toLocaleString();
return date ? (new Date(date)).toLocaleString() : '';
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Component.register('nosto-job-info', {
},

formatDate(date) {
return (new Date(date)).toLocaleString();
return date ? (new Date(date)).toLocaleString() : '';
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Component.register('nosto-job-sub-jobs', {
},

formatDate(date) {
return (new Date(date)).toLocaleString();
return date ? (new Date(date)).toLocaleString() : '';
},
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ Component.register('nosto-job-listing-index', {
},

formatDate(date) {
return (new Date(date)).toLocaleString();
return date ? (new Date(date)).toLocaleString() : '';
},
},
});
2 changes: 1 addition & 1 deletion src/Resources/public/administration/js/nosto-scheduler.js

Large diffs are not rendered by default.

0 comments on commit bfd9092

Please sign in to comment.