Update app/server/lib/DocApi.ts to be clearer

Co-authored-by: Florent <florent.git@zeteo.me>
pull/872/head
CamilleLegeron 3 months ago committed by GitHub
parent 928f60dc89
commit e84d64d274
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1738,7 +1738,7 @@ export class DocWorkerApi {
const doc = await this._dbManager.getDoc(req);
const docTitle = doc.name;
const sufix = tableId ? (tableId === docTitle ? '' : `_${tableId}`) : '';
const filename = optStringParam(req.query.title, 'title') || docTitle + sufix || 'document';
const filename = optStringParam(req.query.title, 'title') || (docTitle + sufix) || 'document';
return filename;
}

Loading…
Cancel
Save