Skip to content

Commit

Permalink
🐛 Fix(custom): fix format convert bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuingsmile committed Jan 30, 2024
1 parent 4870ee6 commit 6b2e2dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "piclist",
"version": "1.7.8",
"version": "1.7.9",
"description": "Modified PicGo core, A tool for picture uploading",
"author": {
"name": "Kuingsmile",
Expand Down
3 changes: 2 additions & 1 deletion src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ export async function imageAddWaterMark (img: Buffer, options: IBuildInWaterMark
}

function formatOptions (options: IBuildInCompressOptions): IBuildInCompressOptions {
const formatConvertObj = typeof options.formatConvertObj === 'string' ? safeParse(options.formatConvertObj) : options.formatConvertObj
return {
quality: forceNumber(options.quality),
isConvert: options.isConvert || false,
Expand All @@ -624,7 +625,7 @@ function formatOptions (options: IBuildInCompressOptions): IBuildInCompressOptio
isFlop: options.isFlop || false,
rotateDegree: forceNumber(options.rotateDegree),
picBed: options.picBed || 'smms',
formatConvertObj: options.formatConvertObj || {}
formatConvertObj: formatConvertObj || {}
}
}

Expand Down

0 comments on commit 6b2e2dd

Please sign in to comment.