Skip to content

Commit 35c6cb2

Browse files
committed
chore: remove last bracket or last bracket and ; in extractRecordArrayEntry
1 parent a2fb427 commit 35c6cb2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apps/web/src/features/upload/utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ function extractSetEntry(entry: string) {
8282
}
8383

8484
function extractRecordArrayEntry(entry: string) {
85-
return entry.slice(13, -2); // 'RECORD_ARRAY(' - why -2?
85+
if (entry.lastIndexOf(';') === entry.length - 2) {
86+
console.log(entry.slice(13, -2));
87+
return entry.slice(13, -2);
88+
}
89+
return entry.slice(13, -1);
8690
}
8791

8892
export function reformatInstrumentData({

0 commit comments

Comments
 (0)