From da65103e05f9324692730f0ea3a012ea31cb6101 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 27 Jun 2025 18:52:16 +0200 Subject: [PATCH] Use toRaw when calling Set.difference Vue's proxy handling interferres with the new Set methods causing them to throw a TypeError when used on Set objects that are replaced by proxies. Workaround by dropping the proxy when using these. See https://github.com/vuejs/core/issues/11398 --- utils/client-schedule.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/client-schedule.ts b/utils/client-schedule.ts index 1e64a19..90ac0ba 100644 --- a/utils/client-schedule.ts +++ b/utils/client-schedule.ts @@ -191,7 +191,7 @@ export class ClientScheduleEvent extends ClientEntity { for (const id of this.serverSlotIds) { this.schedule.eventSlots.get(id)!.discard(); } - for (const id of this.slotIds.difference(this.serverSlotIds)) { + for (const id of toRaw(this.slotIds).difference(this.serverSlotIds)) { const slot = this.schedule.eventSlots.get(id)!; slot.setEventId(slot.serverEventId); } @@ -563,7 +563,7 @@ export class ClientScheduleShift extends ClientEntity { for (const id of this.serverSlotIds) { this.schedule.shiftSlots.get(id)!.discard(); } - for (const id of this.slotIds.difference(this.serverSlotIds)) { + for (const id of toRaw(this.slotIds).difference(this.serverSlotIds)) { const slot = this.schedule.shiftSlots.get(id)!; slot.setShiftId(slot.serverShiftId); }