From 1ab8f315179cc1c93f1319b0e6fb1f75aa1c5954 Mon Sep 17 00:00:00 2001
From: Paul Frazee <pfrazee@gmail.com>
Date: Tue, 18 Apr 2023 15:27:42 -0500
Subject: Fix user avatar and banner selector on web (#490)

---
 src/lib/media/picker.web.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/lib/media/picker.web.tsx')

diff --git a/src/lib/media/picker.web.tsx b/src/lib/media/picker.web.tsx
index 3a9869985..583f78a30 100644
--- a/src/lib/media/picker.web.tsx
+++ b/src/lib/media/picker.web.tsx
@@ -14,7 +14,7 @@ interface PickedFile {
 
 export async function openPicker(
   _store: RootStoreModel,
-  opts: PickerOpts,
+  opts?: PickerOpts,
 ): Promise<RNImage[]> {
   const res = await selectFile(opts)
   const dim = await getImageDim(res.uri)
@@ -70,11 +70,11 @@ export async function openCropper(
  *   src/lib/hooks/usePermissions.ts
  * so that it gets appropriately updated.
  */
-function selectFile(opts: PickerOpts): Promise<PickedFile> {
+function selectFile(opts?: PickerOpts): Promise<PickedFile> {
   return new Promise((resolve, reject) => {
     var input = document.createElement('input')
     input.type = 'file'
-    input.accept = opts.mediaType === 'photo' ? 'image/*' : '*/*'
+    input.accept = opts?.mediaType === 'photo' ? 'image/*' : '*/*'
     input.onchange = e => {
       const target = e.target as HTMLInputElement
       const file = target?.files?.[0]
-- 
cgit 1.4.1

