1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 17:07:19 +02:00

chore: replace [] with null

This commit is contained in:
David Wheatley
2021-12-20 16:27:35 +01:00
parent 0334b6c972
commit 837657831f
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ export default class Dropdown extends Component {
}
view(vnode) {
const items = vnode.children ? listItems(vnode.children) : [];
const items = vnode.children ? listItems(vnode.children) : null;
const renderItems = this.attrs.lazyDraw ? this.showing : true;
return (

View File

@@ -39,7 +39,7 @@ export default class UsersSearchResults implements SearchSource {
.filter((e, i, arr) => arr.lastIndexOf(e) === i)
.sort((a, b) => a.displayName().localeCompare(b.displayName()));
if (!results.length) return [];
if (!results.length) return null;
return [
<li className="Dropdown-header">{app.translator.trans('core.forum.search.users_heading')}</li>,