Skip to content

Commit 09af0b2

Browse files
committed
fix object syntax for router.replace() and transition.redirect() (fix #203)
1 parent 36f2067 commit 09af0b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ class Router {
213213
*/
214214

215215
replace (path) {
216-
this.go({ path, replace: true })
216+
if (typeof path === 'string') {
217+
path = { path }
218+
}
219+
path.replace = true
220+
this.go(path)
217221
}
218222

219223
/**

0 commit comments

Comments
 (0)