From 4101eeabdefa5f49631e675e4a1ade797e4264c3 Mon Sep 17 00:00:00 2001 From: e3dio <85405955+e3dio@users.noreply.github.com> Date: Fri, 19 May 2023 15:23:24 -0700 Subject: [PATCH] update docs hot.md (#2954) * Update hot.md * Update hot.md --- docs/runtime/hot.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/runtime/hot.md b/docs/runtime/hot.md index 275ae85733..d68a9ebeab 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