From abbd46dced872b5cea3060e4f6fe4915d7ae68c4 Mon Sep 17 00:00:00 2001 From: KyrneDev Date: Wed, 24 Mar 2021 17:29:54 -1000 Subject: [PATCH] Null name/desc breaks search fix --- framework/core/js/src/admin/components/AdminNav.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/core/js/src/admin/components/AdminNav.js b/framework/core/js/src/admin/components/AdminNav.js index 8ee4b9699..0c307e7b3 100644 --- a/framework/core/js/src/admin/components/AdminNav.js +++ b/framework/core/js/src/admin/components/AdminNav.js @@ -126,16 +126,17 @@ export default class AdminNav extends Component { categorizedExtensions[category].map((extension) => { const query = this.query().toUpperCase(); - const title = extension.extra['flarum-extension'].title; + const title = extension.extra['flarum-extension'].title || ''; + const description = extension.description || ''; - if (!query || title.toUpperCase().includes(query) || extension.description.toUpperCase().includes(query)) { + if (!query || title.toUpperCase().includes(query) || description.toUpperCase().includes(query)) { items.add( `extension-${extension.id}`, {title} ,