Skip to content

Commit

Permalink
Merge pull request #157 from adrienbrault/patch-1
Browse files Browse the repository at this point in the history
Support passing type to Actions.route, fixes #155
  • Loading branch information
Pavlo Aksonov committed Jan 30, 2016
2 parents 2594f96 + e478c25 commit 5d9d3bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ export default class Router {
if (!this.routes[name]){
throw new Error("No route is defined for name="+name);
}
const action = this.routes[name].type === "switch" ? "jump": this.routes[name].type;
const type = props.type ? props.type : this.routes[name].type;
const action = type === "switch" ? "jump": type;
if (!action){
throw new Error("No type is defined for name="+name);
}
Expand Down

0 comments on commit 5d9d3bd

Please sign in to comment.