Skip to content

Commit

Permalink
Conditionalize missing resource check when resource is not an empty o…
Browse files Browse the repository at this point in the history
…bject
  • Loading branch information
marcellamaki committed Feb 8, 2024
1 parent 125b9f9 commit f1a6b03
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 f1a6b03

Please sign in to comment.