This commit is contained in:
Sean Yesmunt 2020-02-28 17:13:08 -05:00
parent 119bda85dc
commit 98e0e57de7
2 changed files with 10 additions and 8 deletions

View file

@ -204,10 +204,11 @@ function ClaimListDiscover(props: Props) {
}
if (!showReposts) {
options.claim_type =
options.claim_type === undefined
? ['stream', 'channel']
: options.claim_type.filter(claimType => claimType !== 'repost');
if (Array.isArray(options.claim_type)) {
options.claim_type = options.claim_type.filter(claimType => claimType !== 'repost');
} else {
options.claim_type = ['stream', 'channel'];
}
}
const hasMatureTags = tags && tags.some(t => MATURE_TAGS.includes(t));

View file

@ -77,10 +77,11 @@ function ClaimTilesDiscover(props: Props) {
}
if (!showReposts) {
options.claim_type =
options.claim_type === undefined
? ['stream', 'channel']
: options.claim_type.filter(claimType => claimType !== 'repost');
if (Array.isArray(options.claim_type)) {
options.claim_type = options.claim_type.filter(claimType => claimType !== 'repost');
} else {
options.claim_type = ['stream', 'channel'];
}
}
if (claimType) {