fix: toast overload max size error (#1531)

Co-authored-by: Fog3211 <23151576+Fog3211@users.noreply.github.com>
This commit is contained in:
Fog3211 2023-04-16 00:39:31 +08:00 committed by GitHub
parent ef02519e72
commit a654a1cb88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -134,7 +134,7 @@ const CreateResourceDialog: React.FC<Props> = (props: Props) => {
}
} catch (error: any) {
console.error(error);
toast.error(error.response.data.message);
toast.error(typeof error === "string" ? error : error.response.data.message);
}
if (onConfirm) {

View file

@ -182,7 +182,7 @@ const MemoEditor = () => {
resource = await resourceStore.createResourceWithBlob(file);
} catch (error: any) {
console.error(error);
toast.error(error.response.data.message);
toast.error(typeof error === "string" ? error : error.response.data.message);
}
setState((state) => {