mirror of https://github.com/zulip/zulip.git
playground_links_popover: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
c2c17dcd14
commit
38b5fc32f7
|
@ -111,7 +111,7 @@ function register_click_handlers(): void {
|
||||||
// the language has multiple playground links configured, a popover
|
// the language has multiple playground links configured, a popover
|
||||||
// is shown.
|
// is shown.
|
||||||
const extracted_code = $codehilite_div.find("code").text();
|
const extracted_code = $codehilite_div.find("code").text();
|
||||||
if (playground_info.length === 1) {
|
if (playground_info.length === 1 && playground_info[0] !== undefined) {
|
||||||
const url_template = url_template_lib.parse(playground_info[0].url_template);
|
const url_template = url_template_lib.parse(playground_info[0].url_template);
|
||||||
$view_in_playground_button.attr(
|
$view_in_playground_button.attr(
|
||||||
"href",
|
"href",
|
||||||
|
|
Loading…
Reference in New Issue