We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
globalThis.window
1 parent 3d7005a commit 4f882e6Copy full SHA for 4f882e6
1 file changed
src/utils/dataTransfer/Clipboard.ts
@@ -216,10 +216,18 @@ const g = globalThis as {
216
}
217
/* istanbul ignore else */
218
if (typeof g.afterEach === 'function') {
219
- g.afterEach(() => resetClipboardStubOnView(globalThis.window))
+ g.afterEach(() => {
220
+ if (typeof globalThis.window !== 'undefined') {
221
+ resetClipboardStubOnView(globalThis.window)
222
+ }
223
+ })
224
225
226
227
if (typeof g.afterAll === 'function') {
- g.afterAll(() => detachClipboardStubFromView(globalThis.window))
228
+ g.afterAll(() => {
229
230
+ detachClipboardStubFromView(globalThis.window)
231
232
233
0 commit comments