replace exportToHtml by Object.assign(window, { obj })

This commit is contained in:
imperosol
2026-05-21 22:41:51 +02:00
parent 6cec2e74d0
commit ce0ddcd184
5 changed files with 7 additions and 21 deletions
+3 -3
View File
@@ -1,6 +1,5 @@
// biome-ignore lint/performance/noNamespaceImport: this is the recommended way from the documentation
import * as Sentry from "@sentry/browser";
import { exportToHtml } from "#core:utils/globals.ts";
interface LoggedUser {
name: string;
@@ -13,7 +12,7 @@ interface SentryOptions {
user?: LoggedUser;
}
exportToHtml("loadSentryPopup", (options: SentryOptions) => {
const loadSentryPopup = (options: SentryOptions) => {
Sentry.init({
dsn: options.dsn,
});
@@ -21,4 +20,5 @@ exportToHtml("loadSentryPopup", (options: SentryOptions) => {
eventId: options.eventId,
...(options.user ?? {}),
});
});
};
Object.assign(window, { loadSentryPopup });