Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 1, 2024
1 parent 24a3a59 commit ea199cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/components/IconSet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { activeMode, bags, drawerCollapsed, getSearchResults, iconSize, isCurren
import { isLocalMode } from '../env'
import { cacheCollection, specialTabs } from '../data'
import { getIconSnippet } from '../utils/icons'
import {cleanupQuery} from '../utils/query'
import { cleanupQuery } from '../utils/query'

const route = useRoute()
const router = useRouter()
Expand All @@ -22,7 +22,6 @@ const current = computed({
const max = ref(isLocalMode ? 500 : 200)
const searchbar = ref<{ input: HTMLElement }>()


const { search, icons, category, collection, variant } = getSearchResults()
const loading = isCurrentCollectionLoading()

Expand Down Expand Up @@ -85,7 +84,7 @@ function loadMore() {
}

async function loadAll() {
if (!namespace)
if (!namespace.value)
return

await cacheCollection(collection.value!.id)
Expand All @@ -102,7 +101,7 @@ function next(delta = 1) {
return
const newOne = icons.value[index + delta]
if (newOne)
current.value = namespace + newOne
current.value = namespace.value + newOne
}

watch(
Expand Down
3 changes: 1 addition & 2 deletions src/utils/query.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

export function cleanupQuery(query: Record<string, string | undefined | null>) {
for (const key of Object.keys(query)) {
if (!query[key])
delete query[key]
}
return query
}
}

0 comments on commit ea199cf

Please sign in to comment.