Skip to content

Commit

Permalink
fix: require auth condition
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 12, 2023
1 parent e1e9527 commit 2e968cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/devtools/client/pages/modules/custom-[name].vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const route = useRoute()
const router = useRouter()
const name = computed(() => props.name ?? route.params.name)
const tabs = useAllTabs()
const tab = computed(() => tabs.value.find(i => i.name === name.value) as ModuleCustomTab)
const tab = computed(() => tabs.value.find(i => i.name === name.value) as ModuleCustomTab | undefined)
onMounted(() => {
// if the tab is not found and passed a certain timeout, redirect to the overview page
Expand Down Expand Up @@ -46,7 +46,7 @@ onMounted(() => {
</div>
</NPanelGrids>
</template>
<template v-if="tab.requireAuth && !isDevAuthed">
<template v-else-if="tab.requireAuth && !isDevAuthed">
<AuthRequiredPanel />
</template>
<template v-else-if="tab.view.type === 'iframe'">
Expand Down

0 comments on commit 2e968cd

Please sign in to comment.