1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-06 09:19:22 +02:00

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

This commit is contained in:
Laurent Cozic
2020-11-16 17:11:31 +00:00
parent 5f05f85e41
commit 284dbdb362

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 () => {};