mirror of
https://github.com/usememos/memos.git
synced 2024-12-19 17:12:02 +03:00
fix: toast overload max size error (#1531)
Co-authored-by: Fog3211 <23151576+Fog3211@users.noreply.github.com>
This commit is contained in:
parent
ef02519e72
commit
a654a1cb88
@ -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) {
|
||||
|
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user