From 2f4c5d7bc21e68fcc03dda4942a28a18c35b3084 Mon Sep 17 00:00:00 2001 From: RoccoSmit Date: Sat, 1 Feb 2025 11:30:04 +1100 Subject: [PATCH] fix: cancel out of no changes save (#4335) Cancel out of trying to save --- web/src/components/MemoEditor/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/src/components/MemoEditor/index.tsx b/web/src/components/MemoEditor/index.tsx index 6c3b51ca..64b27056 100644 --- a/web/src/components/MemoEditor/index.tsx +++ b/web/src/components/MemoEditor/index.tsx @@ -336,6 +336,9 @@ const MemoEditor = (props: Props) => { } if (updateMask.size === 0) { toast.error("No changes detected"); + if (onCancel) { + onCancel(); + } return; } const memo = await memoStore.updateMemo(memoPatch, Array.from(updateMask));