fix: cancel out of no changes save (#4335)

Cancel out of trying to save
This commit is contained in:
RoccoSmit
2025-02-01 11:30:04 +11:00
committed by GitHub
parent 9bd6d17864
commit 2f4c5d7bc2

View File

@@ -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));