EntitiyManagerでもマージを使う

This commit is contained in:
tamaina 2023-08-11 15:02:11 +00:00
parent a753951b3d
commit fe56d1361c
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ export class EntitiyManager<T extends { id: string }> {
public set(item: T): Ref<T> {
const cached = this.entities.get(item.id);
if (cached) {
cached.value = item;
cached.value = { ...cached.value, ...item };
} else {
this.entities.set(item.id, ref(item) as Ref<T>);
}