Skip to content

Commit 2be8bc7

Browse files
avindrabrophdawg11
andauthored
docs(guides/gotchas): remove typeof window gotcha (#10225)
Co-authored-by: Matt Brophy <[email protected]>
1 parent 2b93f7f commit 2be8bc7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

contributors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
- atesgoral
7272
- athongsavath
7373
- AustinGil
74+
- avindra
7475
- awthwathje
7576
- axel-habermaier
7677
- baby230211

docs/guides/gotchas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (typeof window === "undefined") {
2020
}
2121
```
2222

23-
This works fine in a Node.js environment, however, Deno actually supports `window`! So if you really want to check whether you're running in the browser, it's better to check for `document` instead:
23+
This works fine in a Node.js environment, however, some environments might actually support `window` (like Deno v1), so if you really want to check whether you're running in the browser, it's better to check for `document` instead:
2424

2525
```ts good
2626
if (typeof document === "undefined") {

0 commit comments

Comments
 (0)