mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
Fix document output to better work with reality
This commit is contained in:
parent
59826930e4
commit
985a14629a
1 changed files with 5 additions and 5 deletions
|
@ -43,12 +43,12 @@ function documentFile(metadata) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let desc = `${metadata.author||'Unknown Author'} - ${metadata.title||'Unknown'}`;
|
let result = metadata.author || '';
|
||||||
const created = moment(metadata.createdate);
|
if(result) {
|
||||||
if(created.isValid()) {
|
result += ' - ';
|
||||||
desc += ` (${created.format('YYYY')})`;
|
|
||||||
}
|
}
|
||||||
return desc;
|
result += metadata.title || 'Unknown Title';
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
function imageFile(metadata) {
|
function imageFile(metadata) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue