From f1e23624563c8f5d6e23febff6819be281584754 Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Thu, 12 Mar 2020 15:40:03 +0100 Subject: [PATCH] chore: remove new fetch warning --- packages/vue-app/template/client.js | 7 ++----- packages/vue-app/template/server.js | 1 - 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/vue-app/template/client.js b/packages/vue-app/template/client.js index ab40be8e82..404517bc99 100644 --- a/packages/vue-app/template/client.js +++ b/packages/vue-app/template/client.js @@ -116,7 +116,7 @@ function mapTransitions (toComponents, to, from) { const transition = componentOption(component, 'transition', to, from) || {} return (typeof transition === 'string' ? { name: transition } : transition) } - + const fromComponents = from ? getMatchedComponents(from) : [] const maxDepth = Math.max(toComponents.length, fromComponents.length) @@ -125,7 +125,7 @@ function mapTransitions (toComponents, to, from) { // Clone original objects to prevent overrides const toTransitions = Object.assign({}, componentTransitions(toComponents[i])) const transitions = Object.assign({}, componentTransitions(fromComponents[i])) - + // Combine transitions & prefer `leave` properties of "from" route Object.keys(toTransitions) .filter(key => typeof toTransitions[key] !== 'undefined' && !key.toLowerCase().includes('leave')) @@ -466,9 +466,6 @@ async function render (to, from, next) { <% if (features.fetch) { %> const hasFetch = Boolean(Component.options.fetch) && Component.options.fetch.length - if (hasFetch) { - console.warn('fetch(context) has been deprecated, please use middleware(context)') - } <% } else { %> const hasFetch = false <% } %> diff --git a/packages/vue-app/template/server.js b/packages/vue-app/template/server.js index 4cdf793792..5e362b3274 100644 --- a/packages/vue-app/template/server.js +++ b/packages/vue-app/template/server.js @@ -280,7 +280,6 @@ export default async (ssrContext) => { <% if (features.fetch) { %> // Call fetch(context) if (Component.options.fetch && Component.options.fetch.length) { - console.warn('fetch(context) has been deprecated, please use middleware(context)') promises.push(Component.options.fetch(app.context)) } else { promises.push(null)