From 44ff4765cae44cf664a29e6038c9ec032db462f7 Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Fri, 10 Nov 2023 03:31:15 -0500 Subject: [PATCH] use nullish for this --- src/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/worker.ts b/src/worker.ts index c0455ab..de6eddc 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -81,7 +81,7 @@ app.use('*', logger(customLogger)); app.use('*', async (c, next) => { if (c.req.raw.cf) { - console.log(`Hello from ⛅ ${c.req.raw.cf.colo || 'UNK'}`); + console.log(`Hello from ⛅ ${c.req.raw.cf.colo ?? 'UNK'}`); } console.log('userAgent', c.req.header('user-agent')); await next();