Skip to content

Commit

Permalink
closer match develope
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathonRP committed Jan 27, 2024
1 parent f2c1442 commit aaee6fb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
File renamed without changes.
14 changes: 0 additions & 14 deletions packages/svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@
"types",
"types-ts3.8"
],
"type": "module",
"exports": {
".": {
"default": "./build/esm/index.js",
"import": "./build/esm/index.js",
"require": "./build/cjs/index.js",
"types": "./build/types/index.d.ts",
"typesVersions": {
"<4.9": {
"types": "./build/types-ts3.8/index.d.ts"
}
}
}
},
"main": "build/cjs/index.js",
"module": "build/esm/index.js",
"types": "build/types/index.d.ts",
Expand Down
3 changes: 2 additions & 1 deletion packages/svelte/src/performance.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { getCurrentScope } from '@sentry/browser';
import type { Span, Transaction } from '@sentry/types';
import { afterUpdate, beforeUpdate, onMount } from 'svelte';
import { current_component } from 'svelte/internal';

import { getRootSpan } from '@sentry/core';
import { DEFAULT_COMPONENT_NAME, UI_SVELTE_INIT, UI_SVELTE_UPDATE } from './constants';
Expand Down Expand Up @@ -34,7 +35,7 @@ export function trackComponent(options?: TrackComponentOptions): void {

// current_component.ctor.name is likely to give us the component's name automatically
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
const componentName = `<${customComponentName || DEFAULT_COMPONENT_NAME}>`;
const componentName = `<${customComponentName || current_component.constructor.name || DEFAULT_COMPONENT_NAME}>`;

let initSpan: Span | undefined = undefined;
if (mergedOptions.trackInit) {
Expand Down

0 comments on commit aaee6fb

Please sign in to comment.