Skip to content

Commit 71c1f94

Browse files
committed
Don't break log parsing when Prosperity adds debug data to it
1 parent 5434d07 commit 71c1f94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/algorithm.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -210,11 +210,11 @@ function getAlgorithmData(logLines: string[]): AlgorithmDataRow[] {
210210
continue;
211211
}
212212

213-
const start = lambdaLogPrefix.length;
213+
const start = line.indexOf('[[');
214214
const end = line.lastIndexOf(']') + 1;
215215

216216
try {
217-
const compressedDataRow = JSON.parse(JSON.parse(line.substring(start, end) + '"'));
217+
const compressedDataRow = JSON.parse(JSON.parse('"' + line.substring(start, end) + '"'));
218218
rows.push(decompressDataRow(compressedDataRow, nextSandboxLogs));
219219
} catch (err) {
220220
console.log(line);

0 commit comments

Comments
 (0)