diff options
| author | Andrej Mihajlov <and@codeispoetry.ru> | 2017-06-19 19:20:40 +0300 |
|---|---|---|
| committer | Andrej Mihajlov <and@codeispoetry.ru> | 2017-06-21 12:27:05 +0300 |
| commit | 5a9512a6e2ac319d65adccbd512f6e182b421a2d (patch) | |
| tree | 6c6fe0bc49a6e34cc8e51868b168a95cfe47e660 | |
| parent | 912141007dc076924bec8ed25b32d067e19a176b (diff) | |
| download | mullvadvpn-5a9512a6e2ac319d65adccbd512f6e182b421a2d.tar.xz mullvadvpn-5a9512a6e2ac319d65adccbd512f6e182b421a2d.zip | |
Migrate to TransitionMatch
| -rw-r--r-- | app/transitions.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/transitions.js b/app/transitions.js index 20d18a0ad8..5bdc76471c 100644 --- a/app/transitions.js +++ b/app/transitions.js @@ -29,9 +29,11 @@ export const getTransitionProps = (fromRoute: ?string, toRoute: string): CSSTran return noTransitionProps(); } - const match = transitionRules.find(e => e.match(fromRoute, toRoute)); - if(match) { - return toCSSTransitionGroupProps(match.transitionDescriptor()); + for(const rule of transitionRules) { + const match = rule.match(fromRoute, toRoute); + if(match) { + return toCSSTransitionGroupProps(match.descriptor); + } } return noTransitionProps(); |
