fix: use isAffirmative for checking env var value

pull/872/head
CamilleLegeron 4 months ago
parent a637b5690d
commit 212d91762a

@ -276,7 +276,7 @@ function menuExports(doc: Document, pageModel: DocPageModel) {
menuItem(() => gristDoc.app.comm.showItemInFolder(doc.name),
t("Show in folder"), testId('tb-share-option')) :
menuItem(() => downloadDocModal(doc, pageModel),
menuIcon('Download'), t("Download"), "...", testId('tb-share-option'))
menuIcon('Download'), t("Download..."), testId('tb-share-option'))
),
menuItemLink(hooks.maybeModifyLinkAttrs({ href: gristDoc.getCsvLink(), target: '_blank', download: ''}),
menuIcon('Download'), t("Export CSV"), testId('tb-share-option')),

@ -1734,7 +1734,7 @@ export class DocWorkerApi {
}
private async _getDownloadFilename(req: Request, tableId?: string): Promise<string> {
const addContext = process.env.GRIST_INCLUDE_CONTEXT_TO_DOWNLOAD_FILENAMES || false;
const addContext = isAffirmative(process.env.GRIST_INCLUDE_CONTEXT_TO_DOWNLOAD_FILENAMES || false);
// Query DB for doc metadata to get the doc data.
const doc = await this._dbManager.getDoc(req);

Loading…
Cancel
Save