mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-17 06:01:34 +00:00
chore: remove new fetch warning
This commit is contained in:
parent
2afddf03c1
commit
f1e2362456
@ -116,7 +116,7 @@ function mapTransitions (toComponents, to, from) {
|
|||||||
const transition = componentOption(component, 'transition', to, from) || {}
|
const transition = componentOption(component, 'transition', to, from) || {}
|
||||||
return (typeof transition === 'string' ? { name: transition } : transition)
|
return (typeof transition === 'string' ? { name: transition } : transition)
|
||||||
}
|
}
|
||||||
|
|
||||||
const fromComponents = from ? getMatchedComponents(from) : []
|
const fromComponents = from ? getMatchedComponents(from) : []
|
||||||
const maxDepth = Math.max(toComponents.length, fromComponents.length)
|
const maxDepth = Math.max(toComponents.length, fromComponents.length)
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ function mapTransitions (toComponents, to, from) {
|
|||||||
// Clone original objects to prevent overrides
|
// Clone original objects to prevent overrides
|
||||||
const toTransitions = Object.assign({}, componentTransitions(toComponents[i]))
|
const toTransitions = Object.assign({}, componentTransitions(toComponents[i]))
|
||||||
const transitions = Object.assign({}, componentTransitions(fromComponents[i]))
|
const transitions = Object.assign({}, componentTransitions(fromComponents[i]))
|
||||||
|
|
||||||
// Combine transitions & prefer `leave` properties of "from" route
|
// Combine transitions & prefer `leave` properties of "from" route
|
||||||
Object.keys(toTransitions)
|
Object.keys(toTransitions)
|
||||||
.filter(key => typeof toTransitions[key] !== 'undefined' && !key.toLowerCase().includes('leave'))
|
.filter(key => typeof toTransitions[key] !== 'undefined' && !key.toLowerCase().includes('leave'))
|
||||||
@ -466,9 +466,6 @@ async function render (to, from, next) {
|
|||||||
|
|
||||||
<% if (features.fetch) { %>
|
<% if (features.fetch) { %>
|
||||||
const hasFetch = Boolean(Component.options.fetch) && Component.options.fetch.length
|
const hasFetch = Boolean(Component.options.fetch) && Component.options.fetch.length
|
||||||
if (hasFetch) {
|
|
||||||
console.warn('fetch(context) has been deprecated, please use middleware(context)')
|
|
||||||
}
|
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
const hasFetch = false
|
const hasFetch = false
|
||||||
<% } %>
|
<% } %>
|
||||||
|
@ -280,7 +280,6 @@ export default async (ssrContext) => {
|
|||||||
<% if (features.fetch) { %>
|
<% if (features.fetch) { %>
|
||||||
// Call fetch(context)
|
// Call fetch(context)
|
||||||
if (Component.options.fetch && Component.options.fetch.length) {
|
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))
|
promises.push(Component.options.fetch(app.context))
|
||||||
} else {
|
} else {
|
||||||
promises.push(null)
|
promises.push(null)
|
||||||
|
Loading…
Reference in New Issue
Block a user