From 4b79c38f41786566f86b993ef2ae3f5151c6a9c0 Mon Sep 17 00:00:00 2001 From: Atinux Date: Thu, 16 Nov 2017 13:22:45 +0100 Subject: [PATCH] fix: Fix Cannot read property 'components' of undefined --- lib/app/components/nuxt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/app/components/nuxt.js b/lib/app/components/nuxt.js index f0bad06587..243eec2023 100644 --- a/lib/app/components/nuxt.js +++ b/lib/app/components/nuxt.js @@ -29,7 +29,7 @@ export default { if (typeof this.nuxtChildKey !== 'undefined' || this.$route.matched.length > 1) { return this.nuxtChildKey || compile(this.$route.matched[0].path)(this.$route.params) } - const Component = this.$route.matched[0].components.default + const Component = this.$route.matched[0] && this.$route.matched[0].components.default if (Component && Component.options && Component.options.key) { return (typeof Component.options.key === 'function' ? Component.options.key(this.$route) : Component.options.key) }