Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: keep content and query param on save when access token is invalid (#2524)

zty4f222bca5c84
diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx
index a1b7d9805..83a5ddb56 100644
--- a/web/src/components/MemoEditor/index.tsx
+++ b/web/src/components/MemoEditor/index.tsx
@@ -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();
}