Fix bad reference when image picker is canceled (#1598)

zio/stable
Paul Frazee 2023-10-03 17:19:21 -07:00 committed by GitHub
parent fd5bbb2769
commit 001b29a7e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -174,6 +174,9 @@ export function UserAvatar({
aspect: [1, 1],
})
const item = items[0]
if (!item) {
return
}
const croppedImage = await openCropper(store, {
mediaType: 'photo',

View File

@ -69,6 +69,9 @@ export function UserBanner({
return
}
const items = await openPicker()
if (!items[0]) {
return
}
onSelectNewBanner?.(
await openCropper(store, {