Skip to content

Commit 5d9d3bd

Browse files
author
Pavlo Aksonov
committed
Merge pull request #157 from adrienbrault/patch-1
Support passing type to Actions.route, fixes #155
2 parents 2594f96 + e478c25 commit 5d9d3bd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Router.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ export default class Router {
145145
if (!this.routes[name]){
146146
throw new Error("No route is defined for name="+name);
147147
}
148-
const action = this.routes[name].type === "switch" ? "jump": this.routes[name].type;
148+
const type = props.type ? props.type : this.routes[name].type;
149+
const action = type === "switch" ? "jump": type;
149150
if (!action){
150151
throw new Error("No type is defined for name="+name);
151152
}

0 commit comments

Comments
 (0)