Skip to content

Commit

Permalink
fix: filter empty extensions in error message
Browse files Browse the repository at this point in the history
It seems that not all mime types can be mapped to file extensions.
The concrete case that triggered this fix was "image/vnd.dwg".
  • Loading branch information
czosel authored and Yelinz committed Sep 27, 2024
1 parent 302978c commit fe4f3bd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions addon/services/alexandria-documents.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export default class AlexandriaDocumentsService extends Service {
category: category.name,
types: category.allowedMimeTypes
.map((t) => mime.getExtension(t))
.filter(Boolean)
.join(", "),
}),
);
Expand Down

0 comments on commit fe4f3bd

Please sign in to comment.