mirror of
https://github.com/nuxt/nuxt.git
synced 2024-12-02 02:17:15 +00:00
from_transitions should exist
This commit is contained in:
parent
9e433764d7
commit
936bf8d425
@ -24,7 +24,7 @@ function mapTransitions(Components, to, from) {
|
|||||||
const transitions = Object.assign({}, to ? resolveRoute(to) : resolveTransitions(Component))
|
const transitions = Object.assign({}, to ? resolveRoute(to) : resolveTransitions(Component))
|
||||||
const from_transitions = from ? resolveRoute(from) : {}
|
const from_transitions = from ? resolveRoute(from) : {}
|
||||||
// Combine transitions & prefer leave* transitions of from route
|
// Combine transitions & prefer leave* transitions of from route
|
||||||
Object.keys(from_transitions).forEach(key=> {
|
Object.keys(from_transitions || {}).forEach(key=> {
|
||||||
if (from_transitions[key] && key.toLowerCase().indexOf('leave') !== -1) {
|
if (from_transitions[key] && key.toLowerCase().indexOf('leave') !== -1) {
|
||||||
transitions[key] = from_transitions[key]
|
transitions[key] = from_transitions[key]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user