From fc178211191ccb3ab758eff20e2e20e44d4e7b08 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 30 May 2024 10:07:59 -0700 Subject: [PATCH] hash_parser: Fix TypeScript noUncheckedIndexedAccess errors. Signed-off-by: Anders Kaseorg --- web/src/hash_parser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/hash_parser.ts b/web/src/hash_parser.ts index c51cb0ecb9..d14860bfb2 100644 --- a/web/src/hash_parser.ts +++ b/web/src/hash_parser.ts @@ -12,7 +12,7 @@ export function get_hash_section(hash?: string): string { const parts = hash.replace(/\/$/, "").split(/\//); - return parts[1] || ""; + return parts[1] ?? ""; } function get_nth_hash_section(hash: string, n: number): string {