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'); }