Skip to content

Commit

Permalink
Remove .default convenience on Promise handlers.
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed Aug 15, 2016
1 parent 8b26d30 commit 1ebbf58
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions modules/getComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ function getComponentsForRoute(nextState, route, callback) {
const componentReturn = getComponent.call(route, nextState, callback)
if (isPromise(componentReturn))
componentReturn
// Try module.default first in case of System.import and Babel 6
.then(component => component.default || component)
.then(
component => callback(null, component),
callback
Expand Down
4 changes: 0 additions & 4 deletions modules/matchRoutes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ function getChildRoutes(route, location, paramNames, paramValues, callback) {

if (isPromise(childRoutesReturn))
childRoutesReturn
// Try module.default first in case of System.import and Babel 6
.then(childRoutes => childRoutes.default || childRoutes)
.then(
childRoutes => callback(null, createRoutes(childRoutes)),
callback
Expand All @@ -57,8 +55,6 @@ function getIndexRoute(route, location, paramNames, paramValues, callback) {

if (isPromise(indexRoutesReturn))
indexRoutesReturn
// Try module.default first in case of System.import and Babel 6
.then(indexRoute => indexRoute.default || indexRoute)
.then(
indexRoute => callback(null, createRoutes(indexRoute)[0]),
callback
Expand Down

0 comments on commit 1ebbf58

Please sign in to comment.