hash_parser: Fix TypeScript noUncheckedIndexedAccess errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2024-05-30 10:07:59 -07:00
parent da7d8b902b
commit fc17821119
1 changed files with 1 additions and 1 deletions

View File

@ -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 {