mirror of
https://github.com/web3privacy/explorer-app.git
synced 2024-10-15 16:46:26 +02:00
fix: update empty project link checking to fix search box input issue
This commit is contained in:
parent
f175e2af3b
commit
c8035c6ff9
1 changed files with 6 additions and 5 deletions
|
@ -45,10 +45,11 @@ export const useData = defineStore('data', () => {
|
||||||
const projectToShallow = (project: Project): ProjectShallow => {
|
const projectToShallow = (project: Project): ProjectShallow => {
|
||||||
const availableSupport = () => {
|
const availableSupport = () => {
|
||||||
const filteredKeys = ['forum', 'discord', 'twitter', 'lens', 'farcaster', 'telegram']
|
const filteredKeys = ['forum', 'discord', 'twitter', 'lens', 'farcaster', 'telegram']
|
||||||
if (typeof project.links === 'object' && (project.links !== null || project.links !== undefined))
|
// if (typeof project.links === 'object' && (project.links !== null || project.links !== undefined))
|
||||||
return Object.keys(project.links).filter(key => filteredKeys.includes(key)).length
|
if (project.links == null || project.links == undefined) return 0;
|
||||||
|
|
||||||
return 0
|
if (typeof project.links === 'object' && Object.keys(project.links).length > 0)
|
||||||
|
return Object.keys(project.links).filter(key => filteredKeys.includes(key)).length
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue