Skip to content

Commit 8e6aae7

Browse files
committed
fix: Skip empty filename in frames and fallback to location
1 parent bce11e5 commit 8e6aae7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/browser/src/integrations/globalhandlers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export class GlobalHandlers implements Integration {
242242

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

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

0 commit comments

Comments
 (0)