File tree Expand file tree Collapse file tree 3 files changed +2
-15
lines changed Expand file tree Collapse file tree 3 files changed +2
-15
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 15
15
" types" ,
16
16
" types-ts3.8"
17
17
],
18
- "type" : " module" ,
19
- "exports" : {
20
- "." : {
21
- "default" : " ./build/esm/index.js" ,
22
- "import" : " ./build/esm/index.js" ,
23
- "require" : " ./build/cjs/index.js" ,
24
- "types" : " ./build/types/index.d.ts" ,
25
- "typesVersions" : {
26
- "<4.9" : {
27
- "types" : " ./build/types-ts3.8/index.d.ts"
28
- }
29
- }
30
- }
31
- },
32
18
"main" : " build/cjs/index.js" ,
33
19
"module" : " build/esm/index.js" ,
34
20
"types" : " build/types/index.d.ts" ,
Original file line number Diff line number Diff line change 1
1
import { getCurrentScope } from '@sentry/browser' ;
2
2
import type { Span , Transaction } from '@sentry/types' ;
3
3
import { afterUpdate , beforeUpdate , onMount } from 'svelte' ;
4
+ import { current_component } from 'svelte/internal' ;
4
5
5
6
import { getRootSpan } from '@sentry/core' ;
6
7
import { DEFAULT_COMPONENT_NAME , UI_SVELTE_INIT , UI_SVELTE_UPDATE } from './constants' ;
@@ -34,7 +35,7 @@ export function trackComponent(options?: TrackComponentOptions): void {
34
35
35
36
// current_component.ctor.name is likely to give us the component's name automatically
36
37
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
37
- const componentName = `<${ customComponentName || DEFAULT_COMPONENT_NAME } >` ;
38
+ const componentName = `<${ customComponentName || current_component . constructor . name || DEFAULT_COMPONENT_NAME } >` ;
38
39
39
40
let initSpan : Span | undefined = undefined ;
40
41
if ( mergedOptions . trackInit ) {
You can’t perform that action at this time.
0 commit comments