Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: fix locked note immediately getting locked on edit

Abdullah Atta7ea575a1b8a0
diff --git a/apps/web/src/stores/editor-store.ts b/apps/web/src/stores/editor-store.ts
index 01b1e9c16..b431692cd 100644
--- a/apps/web/src/stores/editor-store.ts
+++ b/apps/web/src/stores/editor-store.ts
@@ -329,8 +329,8 @@ class EditorStore extends BaseStore<EditorStore> {
if (
// when a note is locked or unlocked
- (session.type === "locked") !==
- !!event.item.locked
+ (session.type === "locked") !== !!event.item.locked &&
+ (session.type !== "default" || !session.locked)
) {
openSession(session.id, { force: true, silent: true });
}