From 4f7cc7dd6b864fb9643e803cf5b5dabc805be26f Mon Sep 17 00:00:00 2001 From: Jonas Hermsmeier Date: Mon, 16 Jul 2018 16:08:24 +0200 Subject: [PATCH] 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 --- lib/shared/supported-formats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shared/supported-formats.js b/lib/shared/supported-formats.js index bc0a4a6e..3d26dfa8 100644 --- a/lib/shared/supported-formats.js +++ b/lib/shared/supported-formats.js @@ -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) } }