From 1232c2590ef505be0304cf85980bd502807d926f Mon Sep 17 00:00:00 2001 From: Tommy Wilkinson Date: Mon, 4 Dec 2023 13:56:44 -0800 Subject: [PATCH] Reuse computed module info Fix to re-use the already computed module info rather than re-running it --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 60d053b..cc7bf26 100644 --- a/src/index.ts +++ b/src/index.ts @@ -59,7 +59,7 @@ function prepareStackTraceWithSourceModules(error: Error, frames: CallSite[]): s const moduleInformation = collectModuleInformation(frames); if (moduleInformation) { - return originalStack + '\n' + collectModuleInformation(frames); + return originalStack + '\n' + moduleInformation; } return originalStack;