We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 040b960 commit 7018919Copy full SHA for 7018919
src/runtime/browser/index.ts
@@ -19,7 +19,7 @@ export interface IMeta extends IMetaStatic {
19
20
const meta: IMetaStatic = {
21
runtime: "Browser",
22
- browser: window?.["navigator"].userAgent,
+ browser: globalThis?.["navigator"].userAgent,
23
};
24
25
const pathRegex = /(?:(?:file|https?|global code|[^@]+)@)?(?:file:)?((?:\/[^:/]+){2,})(?::(\d+))?(?::(\d+))?/;
@@ -59,7 +59,7 @@ export function getErrorTrace(error: Error): IStackFrame[] {
59
}
60
61
function stackLineToStackFrame(line?: string): IStackFrame {
62
- const href = window.location.origin;
+ const href = globalThis.location.origin;
63
const pathResult: IStackFrame = {
64
fullFilePath: undefined,
65
fileName: undefined,
0 commit comments