Skip to content

Commit

Permalink
fix unable to update data
Browse files Browse the repository at this point in the history
  • Loading branch information
pelord committed Aug 1, 2024
1 parent 9c187d1 commit 18f72be
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/geo/src/lib/offline/geoDB/geoDB.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ export class GeoDBService {
return this.ngxIndexedDBService.add(this.dbName, geoDBData);
}

if (dbObject.regionIDs.includes(regionID)) {
return of(dbObject);
if (dbObject.regionIDs?.includes(regionID)) {
if (dbObject.insertEvent === geoDBData.insertEvent)
return of(dbObject);
}

dbObject.regionIDs.push(regionID);
return this.customUpdate(dbObject);
return this.customUpdate(geoDBData);
})
)
.subscribe((response) => {
Expand Down

0 comments on commit 18f72be

Please sign in to comment.