Fix unexpected extra and operator (#129)

This commit is contained in:
SULTAN PEYEK 2021-07-16 20:51:32 +07:00 committed by GitHub
parent 178e72abdd
commit 2334a06973
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -4,10 +4,11 @@ import { PublicKey } from '@solana/web3.js';
export const useCreatorArts = (id?: PublicKey | string) => {
const { metadata } = useMeta();
const filtered = metadata.filter(
m =>
m.info.data.creators !== null
&& m.info.data.creators?.findIndex(c => c.address.toBase58() === id) !== undefined &&
&& m.info.data.creators.findIndex(c => c.address.toBase58() === id) >= 0
m =>
m.info.data.creators !== null &&
m.info.data.creators?.findIndex(c => c.address.toBase58() === id) !==
undefined &&
m.info.data.creators.findIndex(c => c.address.toBase58() === id) >= 0,
);
return filtered;