From cbc1e65fa146bb1fe7f8449685996ca76f1a1ab2 Mon Sep 17 00:00:00 2001 From: Artemy Date: Tue, 2 May 2023 18:16:36 +0300 Subject: [PATCH] fix: update text after save in note edit --- src/pages/note.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pages/note.jsx b/src/pages/note.jsx index 5e2a2c1..f6df7fe 100644 --- a/src/pages/note.jsx +++ b/src/pages/note.jsx @@ -97,15 +97,15 @@ function NotePage() { text={edit ? locals.Save : locals.Edit} icon={edit ? ArchiveBoxArrowDownIcon : PencilIcon} onClick={() => { - if (settings.CollabEdit === true) { - textUpdate(notes[params.id].text); - nameUpdate(notes[params.id].name); - } - if (edit) { notes[params.id].name = name; notes[params.id].text = text; localStorage.setObj("Notes", notes); + } else { + if (settings.CollabEdit === true) { + textUpdate(notes[params.id].text); + nameUpdate(notes[params.id].name); + } } setEdit(!edit);