linting-fix

This commit is contained in:
tonyrewin 2022-11-13 12:32:25 +03:00
parent 28f52ba745
commit d1fbc48775
2 changed files with 3 additions and 3 deletions

View File

@ -42,7 +42,7 @@ export default (props: ArticleListProps) => {
return (
<Suspense fallback={<div class="article-preview">{t('Loading')}</div>}>
<For each={[...Array.from({ length: Math.floor(articles().length / 6) }).keys()]}>
<For each={[...Array(Math.floor(articles().length / 6)).keys()]}>
{() => <Block6 articles={articles().slice(0, Math.min(6, articles().length))} />}
</For>
<a href={''} onClick={handleMore} classList={{ disabled: loadingMore() }}>

View File

@ -10,8 +10,8 @@ const [sortedLayoutShouts, setSortedLayoutShouts] = createSignal<Map<LayoutType,
const addLayoutShouts = (layout: LayoutType, shouts: Shout[]) => {
setSortedLayoutShouts((prevSorted: Map<LayoutType, Shout[]>) => {
const siblings = prevSorted.get(layout)
if (Boolean(siblings)) {
const uniqued = Array.from(new Set([...siblings, ...shouts]))
if (siblings) {
const uniqued = [...new Set([...siblings, ...shouts])]
prevSorted.set(layout, uniqued)
}
return prevSorted