Skip to content

Commit

Permalink
fix: declared but never read
Browse files Browse the repository at this point in the history
  • Loading branch information
bingtsingw committed Jun 28, 2023
1 parent e371dfb commit 92e4a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generator/oss-image-crop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const ossImageCrop = ({ src, width, height, aspect, position = 'center' }
let offsetY = 0;

if (position === 'center') {
const offsetY = Math.floor((oHeight - cHeight) / 2);
offsetY = Math.floor((oHeight - cHeight) / 2);
}

return `${src}?x-oss-process=image/crop,x_${offsetX},y_${offsetY},w_${cWidth},h_${cHeight}`;
Expand Down

0 comments on commit 92e4a9f

Please sign in to comment.