File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/browser/src/integrations Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -240,13 +240,17 @@ export class GlobalHandlers implements Integration {
240
240
event . exception . values [ 0 ] . stacktrace = event . exception . values [ 0 ] . stacktrace || { } ;
241
241
event . exception . values [ 0 ] . stacktrace . frames = event . exception . values [ 0 ] . stacktrace . frames || [ ] ;
242
242
243
+ const colno = isNaN ( parseInt ( column , 10 ) ) ? undefined : column ;
244
+ const lineno = isNaN ( parseInt ( line , 10 ) ) ? undefined : line ;
245
+ const filename = isString ( url ) ? url : getLocationHref ( ) ;
246
+
243
247
if ( event . exception . values [ 0 ] . stacktrace . frames . length === 0 ) {
244
248
event . exception . values [ 0 ] . stacktrace . frames . push ( {
245
- colno : column ,
246
- filename : url || getLocationHref ( ) ,
249
+ colno,
250
+ filename,
247
251
function : '?' ,
248
252
in_app : true ,
249
- lineno : line ,
253
+ lineno,
250
254
} ) ;
251
255
}
252
256
You can’t perform that action at this time.
0 commit comments