Skip to content

Commit d2681d8

Browse files
committed
[ha] fix broken kv check
1 parent e40b195 commit d2681d8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

shup-ha/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function stripUnicode(unicodeStr: string) {
5656
async function reportNodeHealth(up: boolean, env: Env, envName: string, origins: Origin[], origin: Origin) {
5757
let existingStatus = (await env.origin_status.get<OriginStatus>(envName + origin.url, "json"))?.down;
5858
// `+` here converts any stored legacy `boolean`s correctly into `OriginStatusType`s
59-
existingStatus = existingStatus ? +existingStatus : undefined;
59+
existingStatus = existingStatus != null ? +existingStatus : undefined;
6060

6161
// we have a very limited number of kv put()s so we need to be frugal with them
6262
// put only if we have a non-up status stored, and the node is going down

0 commit comments

Comments
 (0)