Skip to content

Commit 85b524a

Browse files
committed
Update base-repository.ts
1 parent 9658001 commit 85b524a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

libs/dal/src/repositories/base-repository.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,11 @@ export class BaseRepository<T_DBModel, T_MappedEntity, T_Enforcement> {
410410

411411
protected mapEntities(data: any): T_MappedEntity[] {
412412
const plainData = Array.isArray(data)
413-
? data.map((item) => (item && typeof item === 'object' && 'toObject' in item && typeof item.toObject === 'function'
414-
? item.toObject()
415-
: item))
413+
? data.map((item) =>
414+
item && typeof item === 'object' && 'toObject' in item && typeof item.toObject === 'function'
415+
? item.toObject()
416+
: item
417+
)
416418
: data;
417419

418420
return plainToInstance<T_MappedEntity, T_MappedEntity[]>(this.entity, structuredClone(plainData));

0 commit comments

Comments
 (0)