Skip to content

Commit

Permalink
fix(product): ensure product and version are available before renderi…
Browse files Browse the repository at this point in the history
…ng dependent components (#395)
  • Loading branch information
nateslo authored Feb 12, 2024
1 parent b5f2419 commit a2ad436
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/ViewSpecRegistrationModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ export default defineComponent({
const authStrategyId = computed(() => {
const productVersion = $route.params.product_version
const matchingVersion = props.product.versions.find((version) => version.id === productVersion)
const matchingVersion = props.product?.versions?.find((version) => version.id === productVersion)
if (!matchingVersion) {
return
}
Expand Down
1 change: 1 addition & 0 deletions src/components/product/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
</header>
<SectionOverview :product="product" />
<SectionReference
v-if="activeProductVersionId"
:active-product-version-id="activeProductVersionId"
:product="product"
:deselect-operation="deselectOperation"
Expand Down
2 changes: 1 addition & 1 deletion src/views/ProductShell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="mt-6"
:message="productError"
/>
<template v-else>
<template v-else-if="product">
<div
class="sidebar-wrapper"
>
Expand Down

0 comments on commit a2ad436

Please sign in to comment.