mirror of
https://github.com/status-im/community-dapp.git
synced 2025-02-23 03:28:21 +00:00
Fix crashing when filtering (#106)
This commit is contained in:
parent
01710ff198
commit
ef764e3674
@ -2,6 +2,9 @@ import { CommunityDetail, DirectorySortingEnum, VotingSortingEnum } from '../mod
|
||||
import { DetailedVotingRoom } from '../models/smartContract'
|
||||
|
||||
export function isTextInDetails(filterKeyword: string, details: any) {
|
||||
if (!details || !details.name || !details.description || !details.tags) {
|
||||
return false
|
||||
}
|
||||
return (
|
||||
details.name.toLowerCase().includes(filterKeyword.toLowerCase()) ||
|
||||
details.description.toLowerCase().includes(filterKeyword.toLowerCase()) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user