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
This commit is contained in:
parent
73b28834a1
commit
da65103e05
1 changed files with 2 additions and 2 deletions
|
@ -191,7 +191,7 @@ export class ClientScheduleEvent extends ClientEntity<ApiScheduleEvent> {
|
|||
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<ApiScheduleShift> {
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue