mirror of https://github.com/zulip/zulip.git
hash_parser: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
da7d8b902b
commit
fc17821119
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue