Skip to content

Commit a4f08ca

Browse files
committed
fix: make sure array isnt empty
1 parent ee05320 commit a4f08ca

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ export class InstrumentRecordsService {
431431
instrument: ScalarInstrument,
432432
record: RecordObject
433433
) {
434-
if (Array.isArray(listEntry)) {
434+
if (Array.isArray(listEntry) && listEntry.length > 0) {
435435
for (const objectEntry of listEntry) {
436436
for (const [dataKey, dataValue] of Object.entries(objectEntry as { [key: string]: any })) {
437437
data.push({

0 commit comments

Comments
 (0)