diff options
-rw-r--r-- | docs/runtime/hot.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/runtime/hot.md b/docs/runtime/hot.md index 275ae8573..d68a9ebea 100644 --- a/docs/runtime/hot.md +++ b/docs/runtime/hot.md @@ -79,7 +79,7 @@ declare global { var count: number; } -globalThis.count = globalThis.count ?? 0; +globalThis.count ??= 0; console.log(`Reloaded ${globalThis.count} times`); globalThis.count++; @@ -105,7 +105,7 @@ Bun provides the following simplified API for implementing HTTP servers. Refer t ```ts#server.ts import {type Serve} from "bun"; -globalThis.count = globalThis.count ?? 0; +globalThis.count ??= 0; globalThis.count++; export default { @@ -133,7 +133,7 @@ declare global { var server: Server; } -globalThis.count = globalThis.count ?? 0; +globalThis.count ??= 0; globalThis.count++; // define server parameters |