Unverified Commit 4f222bca authored by zty's avatar zty Committed by GitHub

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: 's avatarzty <zty.dev@outlook.com>
parent 0bb0407f
...@@ -326,6 +326,8 @@ const MemoEditor = (props: Props) => { ...@@ -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) => { ...@@ -348,8 +350,6 @@ const MemoEditor = (props: Props) => {
...prevState, ...prevState,
resourceList: [], resourceList: [],
})); }));
editorRef.current?.setContent("");
clearContentQueryParam();
if (onConfirm) { if (onConfirm) {
onConfirm(); onConfirm();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment