Fix document output to better work with reality

This commit is contained in:
Bryan Ashby 2017-09-18 20:16:42 -06:00
parent 59826930e4
commit 985a14629a
1 changed files with 5 additions and 5 deletions

View File

@ -43,12 +43,12 @@ function documentFile(metadata) {
return;
}
let desc = `${metadata.author||'Unknown Author'} - ${metadata.title||'Unknown'}`;
const created = moment(metadata.createdate);
if(created.isValid()) {
desc += ` (${created.format('YYYY')})`;
let result = metadata.author || '';
if(result) {
result += ' - ';
}
return desc;
result += metadata.title || 'Unknown Title';
return result;
}
function imageFile(metadata) {