fix: lint

This commit is contained in:
0xdevant 2024-06-27 19:00:42 +08:00
parent c8035c6ff9
commit 26f613ec7c
No known key found for this signature in database
GPG key ID: 3B0072B3F5B415CB

View file

@ -46,7 +46,8 @@ export const useData = defineStore('data', () => {
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))
if (project.links == null || project.links == undefined) return 0; if (project.links === null || project.links === undefined)
return 0
if (typeof project.links === 'object' && Object.keys(project.links).length > 0) if (typeof project.links === 'object' && Object.keys(project.links).length > 0)
return Object.keys(project.links).filter(key => filteredKeys.includes(key)).length return Object.keys(project.links).filter(key => filteredKeys.includes(key)).length