mirror of
https://github.com/flarum/framework.git
synced 2025-02-06 15:25:16 +08:00
Null name/desc breaks search fix
This commit is contained in:
parent
4cc9aeeb28
commit
abbd46dced
|
@ -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}`,
|
||||
<ExtensionLinkButton
|
||||
href={app.route('extension', { id: extension.id })}
|
||||
extensionId={extension.id}
|
||||
className="ExtensionNavButton"
|
||||
title={extension.description}
|
||||
title={description}
|
||||
>
|
||||
{title}
|
||||
</ExtensionLinkButton>,
|
||||
|
|
Loading…
Reference in New Issue
Block a user