Skip to content

Commit

Permalink
Merge pull request #11843 from marcellamaki/coach-report-loading-state
Browse files Browse the repository at this point in the history
Add conditional check to ensure resource exists before rendering report page
  • Loading branch information
rtibbles authored Feb 9, 2024
2 parents 32dd9a8 + f1a6b03 commit b46cbb5
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/>
</template>
</HeaderWithOptions>
<MissingResourceAlert v-if="!$isPrint && !resource.available" :multiple="false" />
<MissingResourceAlert v-if="resourceMissing" :multiple="false" />
<h1>
<KLabeledIcon :icon="resource.kind" :label="resource.title" />
</h1>
Expand Down Expand Up @@ -181,6 +181,12 @@
this.resource.license_description
);
},
resourceMissing() {
if (Object.keys(this.resource).length !== 0) {
return !this.$isPrint && !this.resource.available;
}
return false;
},
},
$trs: {
licenseDataHeader: {
Expand Down

0 comments on commit b46cbb5

Please sign in to comment.