diff --git a/pkg/kubewarden/components/Dashboard/InstallView.vue b/pkg/kubewarden/components/Dashboard/InstallView.vue index c456db17..58a55de0 100644 --- a/pkg/kubewarden/components/Dashboard/InstallView.vue +++ b/pkg/kubewarden/components/Dashboard/InstallView.vue @@ -43,14 +43,13 @@ export default { if ( !this.hasSchema ) { const inStore = this.currentProduct.inStore; const hash = []; + const listTypes = [SERVICE, CATALOG.CLUSTER_REPO]; - if ( this.$store.getters[`${ inStore }/canList`](SERVICE) ) { - hash.push(this.$fetchType(SERVICE)); - } - - if ( this.$store.getters[`${ inStore }/canList`](CATALOG.CLUSTER_REPO) ) { - hash.push(this.$fetchType(CATALOG.CLUSTER_REPO)); - } + listTypes.forEach((type) => { + if ( this.$store.getters[`${ inStore }/canList`](type) ) { + hash.push(this.$fetchType(type)); + } + }); await allHash(hash); @@ -318,7 +317,7 @@ export default {