mirror of
https://github.com/zulip/zulip.git
synced 2025-11-16 03:41:58 +00:00
playground_links_popover: Return if 'playground_info' is undefined.
We need fields like 'url_template' to do the code extraction. Those are absent if 'playground_info' is undefined, thus we should return immediately in those cases.
This commit is contained in:
@@ -101,6 +101,9 @@ function register_click_handlers(): void {
|
|||||||
const playground_info = realm_playground.get_playground_info_for_languages(
|
const playground_info = realm_playground.get_playground_info_for_languages(
|
||||||
$codehilite_div.data("code-language"),
|
$codehilite_div.data("code-language"),
|
||||||
);
|
);
|
||||||
|
if (playground_info === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// We do the code extraction here and set the target href expanding
|
// We do the code extraction here and set the target href expanding
|
||||||
// the url_template with the extracted code. Depending on whether
|
// the url_template with the extracted code. Depending on whether
|
||||||
// the language has multiple playground links configured, a popover
|
// the language has multiple playground links configured, a popover
|
||||||
|
|||||||
Reference in New Issue
Block a user