From e1f638b0a399865111b7b8169076f0ad6447ca7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Saquetim?= <1108771+megothss@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:17:13 -0300 Subject: [PATCH] DEV: Prevent error filtering the sidebar items when the section text is empty (#27957) --- .../discourse/app/components/sidebar/api-sections.gjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/sidebar/api-sections.gjs b/app/assets/javascripts/discourse/app/components/sidebar/api-sections.gjs index 7a7996ccbd9..58fe7861537 100644 --- a/app/assets/javascripts/discourse/app/components/sidebar/api-sections.gjs +++ b/app/assets/javascripts/discourse/app/components/sidebar/api-sections.gjs @@ -65,7 +65,7 @@ function prepareSidebarSectionClass(Section) { return this.links; } - if (this.text.toLowerCase().match(this.sidebarState.sanitizedFilter)) { + if (this.text?.toLowerCase()?.match(this.sidebarState.sanitizedFilter)) { return this.links; }