diff --git a/components/ResourceList/index.vue b/components/ResourceList/index.vue index 40808f4a3dd..14891e5354b 100644 --- a/components/ResourceList/index.vue +++ b/components/ResourceList/index.vue @@ -17,6 +17,15 @@ export default { let hasFetch = false; + const inStore = store.getters['currentProduct'].inStore; + const schema = store.getters[`${ inStore }/schemaFor`](resource); + + if ( !schema ) { + store.dispatch('loadingError', `Type ${ resource } not found`); + + return; + } + if ( this.hasListComponent ) { // If you provide your own list then call its asyncData const importer = store.getters['type-map/importList'](resource); @@ -33,8 +42,6 @@ export default { } if ( !hasFetch ) { - const inStore = store.getters['currentProduct'].inStore; - this.rows = await store.dispatch(`${ inStore }/findAll`, { type: resource }); } },