Fix bad reference when image picker is canceled (#1598)
parent
fd5bbb2769
commit
001b29a7e3
|
@ -174,6 +174,9 @@ export function UserAvatar({
|
|||
aspect: [1, 1],
|
||||
})
|
||||
const item = items[0]
|
||||
if (!item) {
|
||||
return
|
||||
}
|
||||
|
||||
const croppedImage = await openCropper(store, {
|
||||
mediaType: 'photo',
|
||||
|
|
|
@ -69,6 +69,9 @@ export function UserBanner({
|
|||
return
|
||||
}
|
||||
const items = await openPicker()
|
||||
if (!items[0]) {
|
||||
return
|
||||
}
|
||||
|
||||
onSelectNewBanner?.(
|
||||
await openCropper(store, {
|
||||
|
|
Loading…
Reference in New Issue