mirror of https://github.com/zulip/zulip.git
composebox_typeahead: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
a1ca665119
commit
e50a115d6f
|
@ -933,7 +933,7 @@ export function get_candidates(
|
||||||
assert(tokens !== null);
|
assert(tokens !== null);
|
||||||
if (tokens[1]) {
|
if (tokens[1]) {
|
||||||
const stream_name = tokens[1];
|
const stream_name = tokens[1];
|
||||||
token = tokens[2] || "";
|
token = tokens[2] ?? "";
|
||||||
|
|
||||||
// Don't autocomplete if there is a space following '>'
|
// Don't autocomplete if there is a space following '>'
|
||||||
if (token.startsWith(" ")) {
|
if (token.startsWith(" ")) {
|
||||||
|
|
Loading…
Reference in New Issue