mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
hash_parser: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user