Skip to content

Commit 81760f9

Browse files
committed
minor cleanup
1 parent ec0b276 commit 81760f9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/svelte/src/sdk.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function init(options: BrowserOptions): void {
2424

2525
/**
2626
* Adds a global event processor to detect if the SDK is initialized in a SvelteKit frontend,
27-
* in which case add SvelteKit an event.modules entry to outgoing events.
27+
* in which case we add SvelteKit an event.modules entry to outgoing events.
2828
* SvelteKit detection is performed only once, when the event processor is called for the
2929
* first time. We cannot perform this check upfront (directly when init is called) because
3030
* at this time, the HTML element might not yet be accessible.
@@ -52,7 +52,8 @@ export function detectAndReportSvelteKit(): void {
5252
/**
5353
* To actually detect a SvelteKit frontend, we search the DOM for a special
5454
* div that's inserted by SvelteKit when the page is rendered. It's identifyed
55-
* by 'svelte-announcer' and used to improve page accessibility.
55+
* by its id, 'svelte-announcer', and it's used to improve page accessibility.
56+
* This div is not present when only using Svelte without SvelteKit.
5657
*
5758
* @see https://github.com/sveltejs/kit/issues/307 for more information
5859
*/

packages/svelte/test/sdk.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ addGlobalEventProcessorFunction.mockImplementation(proc => {
1313
jest.mock('@sentry/browser');
1414

1515
describe('Initialize Svelte SDk', () => {
16-
afterEach(() => {
16+
afterAll(() => {
1717
jest.clearAllMocks();
1818
});
1919

packages/utils/src/browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export function getLocationHref(): string {
124124
}
125125

126126
/**
127-
* Gets a DOM element via document.querySelector.
127+
* Gets a DOM element by using document.querySelector.
128128
*
129129
* This wrapper will first check for the existance of the function before
130130
* actually calling it so that we don't have to take care of this check,

0 commit comments

Comments
 (0)