Skip to content

Commit 3ef8c24

Browse files
tyler-daneCopilot
andauthored
fix: make isSame check more robust in useDraftActions
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent fc5670f commit 3ef8c24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/web/src/views/Calendar/components/Draft/hooks/actions/useDraftActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export const useDraftActions = (
245245
openForm();
246246
return "OPEN_FORM";
247247
}
248-
const isSame = !isEventDirty(draft, reduxDraft);
248+
const isSame = reduxDraft ? !isEventDirty(draft, reduxDraft) : false;
249249
if (isSame) {
250250
// no need to make HTTP request
251251
discard();

0 commit comments

Comments
 (0)