type-guard vs possible null

This commit is contained in:
RealBeepMcJeep 2023-08-30 07:48:47 -07:00
parent 6bd77bac7a
commit 37e20f6fc5
1 changed files with 1 additions and 1 deletions

View File

@ -4704,7 +4704,7 @@ app.post('/import_custom', jsonParser, async (request, response) => {
return response.sendStatus(404); return response.sendStatus(404);
} }
response.set('Content-Type', result.fileType); if (result.fileType) response.set('Content-Type', result.fileType)
response.set('Content-Disposition', `attachment; filename="${result.fileName}"`); response.set('Content-Disposition', `attachment; filename="${result.fileName}"`);
response.set('X-Custom-Content-Type', chubParsed?.type); response.set('X-Custom-Content-Type', chubParsed?.type);
return response.send(result.buffer); return response.send(result.buffer);