mirror of
https://github.com/usememos/memos.git
synced 2025-10-19 10:47:17 +08:00
fix: keep content and query param on save when access token is invalid (#2524)
fix: keep content on save when access token is invalid Co-authored-by: zty <zty.dev@outlook.com>
This commit is contained in:
parent
0bb0407f46
commit
4f222bca5c
1 changed files with 2 additions and 2 deletions
|
@ -326,6 +326,8 @@ const MemoEditor = (props: Props) => {
|
||||||
});
|
});
|
||||||
filterStore.clearFilter();
|
filterStore.clearFilter();
|
||||||
}
|
}
|
||||||
|
editorRef.current?.setContent("");
|
||||||
|
clearContentQueryParam();
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
toast.error(error.response.data.message);
|
toast.error(error.response.data.message);
|
||||||
|
@ -348,8 +350,6 @@ const MemoEditor = (props: Props) => {
|
||||||
...prevState,
|
...prevState,
|
||||||
resourceList: [],
|
resourceList: [],
|
||||||
}));
|
}));
|
||||||
editorRef.current?.setContent("");
|
|
||||||
clearContentQueryParam();
|
|
||||||
if (onConfirm) {
|
if (onConfirm) {
|
||||||
onConfirm();
|
onConfirm();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue