Skip to content

Commit 8cdcce3

Browse files
style: use direct undefined comparison for window check
1 parent 905c344 commit 8cdcce3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

service/src/crypto.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if (!globalThis.crypto) {
1818
// cryptoRSA.ts accesses `window.crypto`, `window.btoa`, and `window.atob`.
1919
// In a Node (non-jsdom) environment `window` is undefined, so we point it at
2020
// globalThis which already has btoa/atob (Node 16+) and crypto (Node 19+).
21-
if (typeof globalThis.window === 'undefined') {
21+
if (globalThis.window === undefined) {
2222
(globalThis as any).window = globalThis;
2323
}
2424

service/src/cryptoecdh.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (!globalThis.crypto) {
1111
(globalThis as any).crypto = webcrypto;
1212
}
1313

14-
if (typeof globalThis.window === 'undefined') {
14+
if (globalThis.window === undefined) {
1515
(globalThis as any).window = globalThis;
1616
}
1717

0 commit comments

Comments
 (0)