playground_links_popover: 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 c2c17dcd14
commit 38b5fc32f7
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ function register_click_handlers(): void {
// the language has multiple playground links configured, a popover
// is shown.
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);
$view_in_playground_button.attr(
"href",