Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix eslint errors: coalescing operator, extra cast

Alexander Brandon Colesfe59bcaf36fd
diff --git a/frontend/src/app/core/upload/fog-upload.service.ts b/frontend/src/app/core/upload/fog-upload.service.ts
index ebbb551d634..f7d68f7916b 100644
--- a/frontend/src/app/core/upload/fog-upload.service.ts
+++ b/frontend/src/app/core/upload/fog-upload.service.ts
@@ -69,7 +69,7 @@ export class FogUploadService extends OpUploadService {
private prepareUpload(href:string, uploadFile:AttachmentUploadFile):Observable<PrepareUploadData> {
const fileName = uploadFile.file.name;
- const contentType = (uploadFile.file.type || (fileName && mime.getType(fileName)) || '' as string);
+ const contentType = uploadFile.file.type ?? (fileName && mime.getType(fileName)) ?? '';
const metadata = {
fileName,
contentType,