From 001b29a7e3adf86eaa2fd82903c3b72cb4403bfa Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Tue, 3 Oct 2023 17:19:21 -0700
Subject: Fix bad reference when image picker is canceled (#1598)

---
 src/view/com/util/UserBanner.tsx | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/view/com/util/UserBanner.tsx')

diff --git a/src/view/com/util/UserBanner.tsx b/src/view/com/util/UserBanner.tsx
index 0b48dcdd7..9a99dc5ad 100644
--- a/src/view/com/util/UserBanner.tsx
+++ b/src/view/com/util/UserBanner.tsx
@@ -69,6 +69,9 @@ export function UserBanner({
               return
             }
             const items = await openPicker()
+            if (!items[0]) {
+              return
+            }
 
             onSelectNewBanner?.(
               await openCropper(store, {
-- 
cgit 1.4.1

