diff --git a/lib/app/client.js b/lib/app/client.js index e68168a94b..3125858d60 100644 --- a/lib/app/client.js +++ b/lib/app/client.js @@ -146,14 +146,14 @@ function resolveComponents(router) { return flatMapComponents(router.match(path), (Component, _, match, key, index) => { // If component already resolved if (typeof Component !== 'function' || Component.options) { - const _Component = applySSRData(sanitizeComponent(Component), NUXT.data[index]) + const _Component = applySSRData(sanitizeComponent(Component), NUXT.data ? NUXT.data[index] : null) match.components[key] = _Component return _Component } // Resolve component return Component().then(Component => { - const _Component = applySSRData(sanitizeComponent(Component), NUXT.data[index]) + const _Component = applySSRData(sanitizeComponent(Component), NUXT.data ? NUXT.data[index] : null) match.components[key] = _Component return _Component })