diff --git a/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx b/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx index 99c3cebbf04..a19bbe8ccc6 100644 --- a/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx +++ b/apps/studio/components/interfaces/Organization/OAuthApps/PublishAppSidePanel/index.tsx @@ -173,7 +173,8 @@ export const PublishAppSidePanel = ({ const onFileUpload = async (event: ChangeEvent) => { event.persist() - const [file] = event.target.files || (event as any).dataTransfer.items + const file = event.target.files?.[0] + if (!file) return setIconFile(file) setIconUrl(URL.createObjectURL(file)) event.target.value = '' @@ -342,7 +343,7 @@ export const PublishAppSidePanel = ({ { - if (uploadButtonRef.current) (uploadButtonRef.current as any).click() + uploadButtonRef.current?.click() }} >

Upload image

@@ -367,7 +368,7 @@ export const PublishAppSidePanel = ({ 'mt-4 mr-4 space-y-2 rounded-full h-[120px] w-[120px] flex flex-col items-center justify-center cursor-pointer' )} onClick={() => { - if (uploadButtonRef.current) (uploadButtonRef.current as any).click() + uploadButtonRef.current?.click() }} >