diff --git a/src/util.ts b/src/util.ts index f9c7c97748..eb3d4a7b12 100644 --- a/src/util.ts +++ b/src/util.ts @@ -361,5 +361,10 @@ export function getCallerLocation(err = new Error()) { } export function getCallerLocationFromString(stackString = 'unknown') { - return stackString.split(/^\s*(at\s)?/m).filter(s => s?.includes(':'))[2]?.trim() || stackString + return ( + stackString + .split(/^\s*(at\s)?/m) + .filter((s) => s?.includes(':'))[2] + ?.trim() || stackString + ) }