mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-08-07 17:48:54 +00:00
Fix crashing on Safari/FF for date conversion
This commit is contained in:
@@ -447,11 +447,11 @@ export class DocumentList implements OnInit, AfterViewChecked, AfterContentInit,
|
|||||||
|
|
||||||
if (col.type === 'date') {
|
if (col.type === 'date') {
|
||||||
let datePipe = new DatePipe();
|
let datePipe = new DatePipe();
|
||||||
// TODO: review when angular 2 is released
|
try {
|
||||||
// .supports has been marked as private in RC2
|
|
||||||
// if (datePipe.supports(value)) {
|
|
||||||
return datePipe.transform(value, col.format);
|
return datePipe.transform(value, col.format);
|
||||||
// }
|
} catch (err) {
|
||||||
|
console.error(`DocumentList: error parsing date ${value} to format ${col.format}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (col.type === 'image') {
|
if (col.type === 'image') {
|
||||||
|
Reference in New Issue
Block a user