Desktop: Fixes #4038: Fixed issue when a newly created note would be automatically moved to the wrong folder on save

pull/4109/head
Laurent Cozic 2020-11-16 17:11:31 +00:00
parent 5f05f85e41
commit 284dbdb362
1 changed files with 4 additions and 1 deletions

View File

@ -140,7 +140,10 @@ export default function useFormNote(dependencies: HookDependencies) {
}, [prevSyncStarted, syncStarted, formNote]);
useEffect(() => {
if (!noteId) return () => {};
if (!noteId) {
if (formNote.id) setFormNote(defaultFormNote());
return () => {};
}
if (formNote.id === noteId) return () => {};