Skip to content

Commit 5f0b85f

Browse files
committed
fix: properly set fileItem when no filter was applied
1 parent 8f6ec81 commit 5f0b85f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/shared/converters/image-converter.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,8 @@ class ImageConverter extends Converter {
129129
maxDimension = parseFloat( maxDimension )
130130
}
131131

132-
const modifiedFile = await applyFilters( 'cimo.convertImage.prepare', fileItem, outputFormat, options )
133-
if ( modifiedFile ) {
134-
fileItem.file = modifiedFile
135-
}
132+
// Allow preprocessing of the image before the conversion
133+
fileItem.file = await applyFilters( 'cimo.convertImage.prepare', fileItem.file, outputFormat, options )
136134

137135
return new Promise( ( resolve, reject ) => {
138136
const img = new Image()

0 commit comments

Comments
 (0)