Fix bad reference when image picker is canceled (#1598)
This commit is contained in:
parent
fd5bbb2769
commit
001b29a7e3
2 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue