mirror of
https://github.com/flarum/core.git
synced 2025-07-18 23:31:17 +02:00
Fix routeName attr not being passed into pages
This commit is contained in:
@@ -24,11 +24,18 @@ export default class DefaultResolver {
|
|||||||
return this.routeName + JSON.stringify(m.route.param());
|
return this.routeName + JSON.stringify(m.route.param());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
makeAttrs(vnode) {
|
||||||
|
return {
|
||||||
|
...vnode.attrs,
|
||||||
|
routeName: this.routeName,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
onmatch(args, requestedPath, route) {
|
onmatch(args, requestedPath, route) {
|
||||||
return this.component;
|
return this.component;
|
||||||
}
|
}
|
||||||
|
|
||||||
render(vnode) {
|
render(vnode) {
|
||||||
return [{ ...vnode, routeName: this.routeName, key: this.makeKey() }];
|
return [{ ...vnode, attrs: this.makeAttrs(vnode), key: this.makeKey() }];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user