Skip to content

Commit bc733df

Browse files
committed
fix(web): ensure draft ID is not optimistic in useDraftActions
1 parent 020bb22 commit bc733df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ export const useDraftActions = (
285285
}
286286

287287
const { startOfView, endOfView } = weekProps.component;
288-
const isExisting = draft._id;
288+
const isExisting =
289+
draft._id && !draft._id.startsWith(ID_OPTIMISTIC_PREFIX);
289290

290291
if (isExisting) {
291292
const isDateWithinView = (date: string) =>

0 commit comments

Comments
 (0)