Handle anonymous stack frames correctly

pull/4/head
Sven Slootweg 4 years ago
parent bae1f0e9fc
commit 1a97d4ee09

@ -114,7 +114,10 @@ function removeInternalFrames(stack) {
let internalBasePath = getInternalBasePath();
return stack.filter((frame) => {
return (!frame.location.path.startsWith(internalBasePath));
return (
!frame.location.anonymous
&& !frame.location.path.startsWith(internalBasePath)
);
});
}

@ -18,6 +18,9 @@ function maybeTrim(value) {
}
function parseLocation(locationString) {
if (locationString === "<anonymous>") {
return { anonymous: true };
} else {
let match = positionRegex.exec(locationString);
if (match != null) {
@ -29,6 +32,7 @@ function parseLocation(locationString) {
} else {
throw new Error(`Could not parse location from string: ${locationString}`);
}
}
}
function extractFrames(stack) {

Loading…
Cancel
Save