Skip to content

Commit 49ac1aa

Browse files
committed
fix(opts-helpers): $addMiddlewareContext, override internal props only
1 parent 6f4441a commit 49ac1aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/install.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ export const install: Install<Router | PluginOptions> = (
6767
return context
6868
}
6969
vue.$addMiddlewareContext = (key: string, value: any) => {
70-
context = { [key]: value, ...context }
70+
const { to, from, redirect, app } = context
71+
context = { [key]: value, to, from, redirect, app }
7172
}
7273
vue.$updateMiddlewareContext = (key: string, value: any) => {
7374
if (key === 'app') {

0 commit comments

Comments
 (0)