Skip to content

Commit 0b85c3c

Browse files
committed
fix: initial value of filters for graph
1 parent 48302bd commit 0b85c3c

File tree

1 file changed

+3
-3
lines changed
  • packages/devtools/src/app/pages/session/[session]/graph

1 file changed

+3
-3
lines changed

packages/devtools/src/app/pages/session/[session]/graph/index.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts">
22
import type { SessionContext } from '~~/shared/types'
33
import { useRoute, useRouter } from '#app/composables/router'
4-
import { clearUndefined } from '@antfu/utils'
4+
import { clearUndefined, toArray } from '@antfu/utils'
55
import { computedWithControl, debouncedWatch } from '@vueuse/core'
66
import Fuse from 'fuse.js'
77
import { computed, reactive } from 'vue'
@@ -24,8 +24,8 @@ const router = useRouter()
2424
2525
const filters = reactive<Filters>({
2626
search: (route.query.search || '') as string,
27-
file_types: (route.query.file_types || null) as string[] | null,
28-
node_modules: (route.query.node_modules || null) as string[] | null,
27+
file_types: (route.query.file_types ? toArray(route.query.file_types) : null) as string[] | null,
28+
node_modules: (route.query.node_modules ? toArray(route.query.node_modules) : null) as string[] | null,
2929
})
3030
3131
debouncedWatch(

0 commit comments

Comments
 (0)