fix(lib): Fix MIME type exclusion condition

As `mime.extension()` returns `false`, instead of `null` or `undefined`,
this condition simply needs to check for truthyness.

Change-type: patch
This commit is contained in:
Jonas Hermsmeier 2018-07-16 16:08:24 +02:00 committed by Alexis Svinartchouk
parent 21f1f4e503
commit 4f7cc7dd6b

View File

@ -40,7 +40,7 @@ exports.getCompressedExtensions = () => {
for (const [ mimetype, cls ] of sdk.sourceDestination.SourceDestination.mimetypes.entries()) {
if (cls.prototype instanceof sdk.sourceDestination.CompressedSource) {
const extension = mime.extension(mimetype)
if (extension !== null) {
if (extension) {
result.push(extension)
}
}