Skip to content

Commit 8a33129

Browse files
authored
Merge pull request #6620 from WoltLab/62-image-cropper-fix
Image cropper provides no dimensions in error for single-size configs
2 parents f31cd88 + 769296c commit 8a33129

File tree

2 files changed

+2
-2
lines changed
  • ts/WoltLabSuite/Core/Component/Image
  • wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image

2 files changed

+2
-2
lines changed

ts/WoltLabSuite/Core/Component/Image/Cropper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ class ExactImageCropper extends ImageCropper {
357357

358358
if (sizes.length === 0) {
359359
const smallestSize =
360-
this.configuration.sizes.length > 1 ? this.configuration.sizes[this.configuration.sizes.length - 1] : undefined;
360+
this.configuration.sizes.length > 0 ? this.configuration.sizes[this.configuration.sizes.length - 1] : undefined;
361361
throw new Error(
362362
getPhrase("wcf.upload.error.image.tooSmall", {
363363
width: smallestSize?.width,

wcfsetup/install/files/js/WoltLabSuite/Core/Component/Image/Cropper.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)