Merge pull request 'fix #3525' (#3535) from fix-avatar-upload into develop

Reviewed-on: https://git.pleroma.social/pleroma/pleroma-fe/pulls/3535
This commit is contained in:
HJ 2026-08-05 15:44:46 +00:00
commit 1b7e35fcb3
2 changed files with 4 additions and 0 deletions

View file

@ -0,0 +1 @@
fix image cropper error preventing avatar upload

View file

@ -70,6 +70,9 @@ const ImageCropper = {
) )
}, },
onCropperSelectionChange(event) { onCropperSelectionChange(event) {
if (!this.$refs.cropperCanvas) {
return // Cropper sends even before component is fully initialized
}
const cropperCanvas = this.$refs.cropperCanvas const cropperCanvas = this.$refs.cropperCanvas
const cropperCanvasRect = cropperCanvas.getBoundingClientRect() const cropperCanvasRect = cropperCanvas.getBoundingClientRect()
const selection = event.detail const selection = event.detail