From b7f0b44886060ea49865dcbe5fa40310c28f848b Mon Sep 17 00:00:00 2001 From: EGOIST Date: Sun, 15 May 2022 16:15:57 +0800 Subject: [PATCH] fix typo --- web/src/pages/dashboard/[subdomain]/editor.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/pages/dashboard/[subdomain]/editor.tsx b/web/src/pages/dashboard/[subdomain]/editor.tsx index ce59905f..9ce1bd60 100644 --- a/web/src/pages/dashboard/[subdomain]/editor.tsx +++ b/web/src/pages/dashboard/[subdomain]/editor.tsx @@ -120,8 +120,10 @@ export default function SubdomainEditor() { `\n\n![${file.name.replace(/\.\w+$/, "")}](${key})\n\n` ) ) - } catch (error: any) { - toast.error(error.mesage, { id: toastId }) + } catch (error) { + if (error instanceof Error) { + toast.error(error.message, { id: toastId }) + } } }, [uploadFile]