From cb966c989da6db02f2a8ef7924f8e90d0733a6d8 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Sat, 3 Aug 2024 19:38:09 -0700 Subject: [PATCH] remove cleanStackLine I'm not sure what the point of this was. Testing locally, they all seem to work without it. --- src/utils.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/utils.js b/src/utils.js index c567201..7f42976 100644 --- a/src/utils.js +++ b/src/utils.js @@ -135,14 +135,10 @@ export function collectObjects(state, type) { return list; } -function cleanStackLine(line) { - return line.replace(/^\s*at\s+/, ''); -} - export function getStackTrace() { const stack = (new Error()).stack; const lines = stack.split('\n'); // Remove the first two entries, the error message and this function itself, or the webgl-memory itself. - const userLines = lines.slice(2).filter((l) => !l.includes('webgl-memory')); - return userLines.map((l) => cleanStackLine(l)); + const userLines = lines.slice(2).filter((l) => !l.includes('webgl-memory.js')); + return userLines.join('\n'); }