fix(date formatting): Show study date as a fallback for an empty series date and show 'No Study Date' as a back up for both (#3483)
This commit is contained in:
1 parent
fa37593696
commit
15ad8f29cd
4 files changed
+11
-4
No files matched your search
@@ -8,5 +8,6 @@ import moment from 'moment';
|
||||
* @returns {string} Formatted date
|
||||
*/
|
||||
export default (date, format = 'DD-MMM-YYYY') => {
|
||||
return moment(date).format(format);
|
||||
// moment(undefined) returns the current date, so return the empty string instead
|
||||
return date ? moment(date).format(format) : '';
|
||||
};
|
||||
Reference in new issue
Block a user