File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ export default {
51
51
let keyToType = {
52
52
boardSlug : 'board' ,
53
53
slug : 'thread' ,
54
- threadSlug : 'thread'
54
+ threadSlug : 'thread' ,
55
+ username : 'profile'
55
56
}
56
57
// remove anchor hash from params
57
58
let routeParamKeys = without ( Object . keys ( routeParams ) , '#' )
@@ -60,11 +61,13 @@ export default {
60
61
// matches, route is dynamic
61
62
if ( ! isEmpty ( matches ) ) {
62
63
let idKey = routeParamKeys . reverse ( ) [ 0 ]
63
- let id = routeParams [ idKey ]
64
+ // for proxy, use query parameter to get user id
65
+ let id = idKey !== 'username' ? routeParams [ idKey ] : $route . query . id
64
66
let type = keyToType [ idKey ]
65
67
let crumbs = await breadcrumbsApi . find ( id , type )
66
68
breadcrumbs . splice ( 0 , breadcrumbs . length )
67
- breadcrumbs . push ( pathLookup . home )
69
+ // for proxy, do not push 'Home' to breadcrumbs for profile page
70
+ if ( idKey !== 'username' ) breadcrumbs . push ( pathLookup . home )
68
71
breadcrumbs . push ( ...crumbs . breadcrumbs )
69
72
70
73
}
You can’t perform that action at this time.
0 commit comments