diff --git a/ng-store/projects/ng-store/package.json b/ng-store/projects/ng-store/package.json index d1f2ede..cf22c5b 100644 --- a/ng-store/projects/ng-store/package.json +++ b/ng-store/projects/ng-store/package.json @@ -1,6 +1,6 @@ { "name": "@ssougnez/ng-store", - "version": "1.0.2", + "version": "1.0.3", "keywords": [ "Angular", "store", "data management", "reactive", "ngrx", "state" ], "peerDependencies": { "@angular/common": ">= 14.0.0", diff --git a/ng-store/projects/ng-store/src/lib/services/ng-store.service.ts b/ng-store/projects/ng-store/src/lib/services/ng-store.service.ts index aace9ef..121590f 100644 --- a/ng-store/projects/ng-store/src/lib/services/ng-store.service.ts +++ b/ng-store/projects/ng-store/src/lib/services/ng-store.service.ts @@ -411,7 +411,7 @@ export class NgStore { for (const index of snapshotRoot._indiceNames) { const value = snapshotRoot._array[i].value[index]; - const mapArray = (snapshotRoot._indices[index].get(value) || []).filter(p => p !== i); + const mapArray = (draftRoot._indices[index].get(value) || []).filter(p => p !== i); draftRoot._indices[index].set(value, mapArray); }