feature/comparison-slider #19
@@ -46,9 +46,6 @@ export class EntityStore<T extends Entity> {
|
|||||||
updateOne(id: string, changes: Partial<T>) {
|
updateOne(id: string, changes: Partial<T>) {
|
||||||
const entity = this.#entities.get(id);
|
const entity = this.#entities.get(id);
|
||||||
if (entity) {
|
if (entity) {
|
||||||
// In Svelte 5, updating the object property directly is reactive
|
|
||||||
// if the object itself was made reactive, but here we replace
|
|
||||||
// the reference to ensure top-level map triggers.
|
|
||||||
this.#entities.set(id, { ...entity, ...changes });
|
this.#entities.set(id, { ...entity, ...changes });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user