Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

playground_links_popover: Fix TypeScript noUncheckedIndexedAccess errors.

Anders Kaseorg38b5fc32f7a1
diff --git a/web/src/playground_links_popover.ts b/web/src/playground_links_popover.ts
index bfc4c7bfd50..b2b7a20aef7 100644
--- a/web/src/playground_links_popover.ts
+++ b/web/src/playground_links_popover.ts
@@ -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",