Skip to content

Commit 2169818

Browse files
committed
ci: fix maybe
1 parent c612c0b commit 2169818

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

packages/router/__tests__/utils.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,15 @@ export function createDom(options?: ConstructorOptions) {
108108
}
109109
)
110110

111-
// @ts-expect-error: needed for jsdom
112-
global.window = dom.window
113-
global.location = dom.window.location
114-
global.history = dom.window.history
115-
global.document = dom.window.document
111+
try {
112+
// @ts-expect-error: not the same window
113+
global.window = dom.window
114+
global.location = dom.window.location
115+
global.history = dom.window.history
116+
global.document = dom.window.document
117+
} catch (erro) {
118+
// it's okay, some are readonly
119+
}
116120

117121
return dom
118122
}

0 commit comments

Comments
 (0)