Skip to content

Commit

Permalink
Don't iterate twice
Browse files Browse the repository at this point in the history
  • Loading branch information
poteto committed May 10, 2017
1 parent c5b6290 commit 6b08ecc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions addon/helpers/route-action.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ function getCurrentHandlers(router) {
return getCurrentHandlerInfos(router)
.reduce((acc, h) => {
return h.name === currentRouteName || h.name === currentRoot
? [...acc, h.handler]
? [h.handler, ...acc]
: acc;
}, [])
.reverse();
}, []);
}

/**
Expand Down

0 comments on commit 6b08ecc

Please sign in to comment.