mirror of
https://github.com/usememos/memos.git
synced 2025-12-11 22:57:09 +08:00
fix: cancel out of no changes save (#4335)
Cancel out of trying to save
This commit is contained in:
parent
9bd6d17864
commit
2f4c5d7bc2
1 changed files with 3 additions and 0 deletions
|
|
@ -336,6 +336,9 @@ const MemoEditor = (props: Props) => {
|
||||||
}
|
}
|
||||||
if (updateMask.size === 0) {
|
if (updateMask.size === 0) {
|
||||||
toast.error("No changes detected");
|
toast.error("No changes detected");
|
||||||
|
if (onCancel) {
|
||||||
|
onCancel();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const memo = await memoStore.updateMemo(memoPatch, Array.from(updateMask));
|
const memo = await memoStore.updateMemo(memoPatch, Array.from(updateMask));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue