File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
apps/files/src/components Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 6767 class =" files-list__row-mtime"
6868 data-cy-files-list-row-mtime
6969 @click =" openDetailsIfAvailable" >
70- <NcDateTime v-if =" source.mtime" :timestamp =" source.mtime" :ignore-seconds =" true" />
70+ <NcDateTime v-if =" mtime" :timestamp =" mtime" :ignore-seconds =" true" />
71+ <span v-else >{{ t('files', 'Unknown date') }}</span >
7172 </td >
7273
7374 <!-- View columns -->
@@ -204,6 +205,19 @@ export default defineComponent({
204205 }
205206 },
206207
208+ mtime() {
209+ // If the mtime is not a valid date, return it as is
210+ if (this .source .mtime && ! isNaN (this .source .mtime .getDate ())) {
211+ return this .source .mtime
212+ }
213+
214+ if (this .source .crtime && ! isNaN (this .source .crtime .getDate ())) {
215+ return this .source .crtime
216+ }
217+
218+ return null
219+ },
220+
207221 mtimeTitle() {
208222 if (this .source .mtime ) {
209223 return moment (this .source .mtime ).format (' LLL' )
You can’t perform that action at this time.
0 commit comments