refactor: simplify logic

This commit is contained in:
cv
2025-04-06 11:51:31 +02:00
committed by Carlos Valente
parent 03e68c03a9
commit b136e2856a
@@ -108,7 +108,7 @@ export async function deleteEvent(eventIds: string[]) {
const scopedMutation = cache.mutateCache(cache.remove);
const { didMutate } = await scopedMutation({ eventIds });
if (didMutate === false) {
if (!didMutate) {
return;
}
@@ -146,7 +146,7 @@ export async function editEvent(patch: PatchWithId) {
const { newEvent, didMutate } = await scopedMutation({ patch, eventId: patch.id });
// short circuit if nothing changed
if (didMutate === false) {
if (!didMutate) {
return newEvent;
}