Skip to content

Commit

Permalink
fix: Skip empty filename in frames and fallback to location
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Nov 8, 2019
1 parent bce11e5 commit 8e6aae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/browser/src/integrations/globalhandlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class GlobalHandlers implements Integration {

const colno = isNaN(parseInt(column, 10)) ? undefined : column;
const lineno = isNaN(parseInt(line, 10)) ? undefined : line;
const filename = isString(url) ? url : getLocationHref();
const filename = isString(url) && url.length > 0 ? url : getLocationHref();

if (event.exception.values[0].stacktrace.frames.length === 0) {
event.exception.values[0].stacktrace.frames.push({
Expand Down

0 comments on commit 8e6aae7

Please sign in to comment.