Skip to content

Commit

Permalink
fix: encode module id
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 1, 2021
1 parent 3d5827e commit 111e944
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/client/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ declare global {
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const defineComponent: typeof import('vue')['defineComponent']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
const h: typeof import('vue')['h']
const inject: typeof import('vue')['inject']
Expand All @@ -34,7 +35,6 @@ declare global {
const useCssModule: typeof import('vue')['useCssModule']
const createApp: typeof import('vue')['createApp']
const triggerRef: typeof import('vue')['triggerRef']
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
const onDeactivated: typeof import('vue')['onDeactivated']
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
Expand Down Expand Up @@ -76,6 +76,7 @@ declare global {
const useTimeout: typeof import('@vueuse/core')['useTimeout']
const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
const useToggle: typeof import('@vueuse/core')['useToggle']
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
const whenever: typeof import('@vueuse/core')['whenever']
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
Expand All @@ -94,6 +95,7 @@ declare global {
const useClipboard: typeof import('@vueuse/core')['useClipboard']
const useCssVar: typeof import('@vueuse/core')['useCssVar']
const useDark: typeof import('@vueuse/core')['useDark']
const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory']
const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion']
const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation']
const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio']
Expand Down Expand Up @@ -137,12 +139,14 @@ declare global {
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
const useScroll: typeof import('@vueuse/core')['useScroll']
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
const useShare: typeof import('@vueuse/core')['useShare']
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
const useStorage: typeof import('@vueuse/core')['useStorage']
const useSwipe: typeof import('@vueuse/core')['useSwipe']
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
const useTitle: typeof import('@vueuse/core')['useTitle']
Expand All @@ -151,6 +155,7 @@ declare global {
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
const useVModel: typeof import('@vueuse/core')['useVModel']
const useVModels: typeof import('@vueuse/core')['useVModels']
const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
Expand Down
2 changes: 1 addition & 1 deletion src/client/components/ModuleList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defineProps<{
v-for="m in modules"
:key="m.id"
class="block border-b border-main px-3 py-2 text-left font-mono text-sm"
:to="`/module?id=${m.id}`"
:to="`/module?id=${encodeURIComponent(m.id)}`"
>
<ModuleId :id="m.id" />
<div v-if="listMode === 'detailed'" class="text-xs">
Expand Down

0 comments on commit 111e944

Please sign in to comment.