from_transitions should exist

This commit is contained in:
Issam Hakimi aka Killix 2017-06-19 10:26:06 +01:00
parent 9e433764d7
commit 936bf8d425

View File

@ -24,7 +24,7 @@ function mapTransitions(Components, to, from) {
const transitions = Object.assign({}, to ? resolveRoute(to) : resolveTransitions(Component))
const from_transitions = from ? resolveRoute(from) : {}
// 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) {
transitions[key] = from_transitions[key]
}