Skip to content

Commit 68d2248

Browse files
committed
fix: dont slice away function defs
1 parent 2898095 commit 68d2248

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/core/storage.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ export function preprocessCapture(
342342
error?: any
343343
) {
344344
// Iterate over calls and functions
345-
let funcsCopy = [...functions]
345+
const funcsCopy = [...functions]
346346
let callsCopy = [...calls].sort((callA, callB) => callA.timestamp - callB.timestamp).reverse()
347347

348348
let size = 0
@@ -373,13 +373,6 @@ export function preprocessCapture(
373373
funcsCopy[i].output = FLYTRAP_UNSERIALIZABLE_VALUE
374374
}
375375
}
376-
tryCatchSync(() => {
377-
size += stringify(funcsCopy[i]).length
378-
if (size >= 1_000_000) {
379-
// Remove the rest
380-
funcsCopy = funcsCopy.slice(0, 1)
381-
}
382-
})
383376
}
384377
return [funcsCopy, callsCopy, error] as const
385378
}

0 commit comments

Comments
 (0)