fix filter issue

This commit is contained in:
liangping 2023-12-20 17:18:15 +08:00
parent 1c9c0a6656
commit ef6a2aa9c7

View File

@ -40,7 +40,10 @@ export const useGovStore = defineStore('govStore', {
//filter spam proposals
if(proposals?.proposals) {
proposals.proposals = proposals.proposals.filter((item) => item.content.title && item.content.title.toLowerCase().indexOf("airdrop")===-1);
proposals.proposals = proposals.proposals.filter((item) => {
const title = item.content.title || item.title
return title && title.toLowerCase().indexOf("airdrop")===-1
});
}
if (status === '2') {