Skip to content

Commit 4cf991b

Browse files
committed
chore: remove redundant array check in expandData method
1 parent f35564c commit 4cf991b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

apps/api/src/instrument-records/instrument-records.service.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ export class InstrumentRecordsService {
181181
if (arrayResult.isErr()) {
182182
throw new Error('Error interpreting array computed measure');
183183
}
184-
continue;
185184
} else {
186185
data.push({
187186
groupId: record.subject.groupIds[0] ?? DEFAULT_GROUP_NAME,
@@ -407,11 +406,11 @@ export class InstrumentRecordsService {
407406

408407
private expandData(
409408
data: InstrumentRecordsExport,
410-
listEntry: any,
409+
listEntry: any[],
411410
instrument: ScalarInstrument,
412411
record: RecordObject
413412
) {
414-
if (Array.isArray(listEntry) && listEntry.length > 0) {
413+
if (listEntry.length > 0) {
415414
for (const objectEntry of listEntry) {
416415
for (const [dataKey, dataValue] of Object.entries(objectEntry as { [key: string]: any })) {
417416
data.push({

0 commit comments

Comments
 (0)