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>
pull/2525/head
zty 1 year ago committed by GitHub
parent 0bb0407f46
commit 4f222bca5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -326,6 +326,8 @@ const MemoEditor = (props: Props) => {
});
filterStore.clearFilter();
}
editorRef.current?.setContent("");
clearContentQueryParam();
} catch (error: any) {
console.error(error);
toast.error(error.response.data.message);
@ -348,8 +350,6 @@ const MemoEditor = (props: Props) => {
...prevState,
resourceList: [],
}));
editorRef.current?.setContent("");
clearContentQueryParam();
if (onConfirm) {
onConfirm();
}

Loading…
Cancel
Save