diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-03-20 20:19:01 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-03-20 20:19:01 +0000 |
| commit | 716b648014d82efa99de2cb137a5db5f02db6831 (patch) | |
| tree | 196ef38e454bc03baa2b4b894558cb4add3ae308 /src/components/navigation/navigation_pins.js | |
| parent | 8abaf8fa375d8453b2284fbf529cd03ff565bcd4 (diff) | |
| parent | 306e254c15c7cb7a19b680a5666695f429445729 (diff) | |
Merge branch 'fix-user-profile-route-crash' into 'develop'
Fix user-profile route crash on pinned favorites timeline
See merge request pleroma/pleroma-fe!1801
Diffstat (limited to 'src/components/navigation/navigation_pins.js')
| -rw-r--r-- | src/components/navigation/navigation_pins.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/components/navigation/navigation_pins.js b/src/components/navigation/navigation_pins.js index 9dd795aa..ef78e44c 100644 --- a/src/components/navigation/navigation_pins.js +++ b/src/components/navigation/navigation_pins.js @@ -1,5 +1,5 @@ import { mapState } from 'vuex' -import { TIMELINES, ROOT_ITEMS, USERNAME_ROUTES } from 'src/components/navigation/navigation.js' +import { TIMELINES, ROOT_ITEMS, routeTo } from 'src/components/navigation/navigation.js' import { getListEntries, filterNavigation } from 'src/components/navigation/filter.js' import { library } from '@fortawesome/fontawesome-svg-core' @@ -31,14 +31,7 @@ const NavPanel = { props: ['limit'], methods: { getRouteTo (item) { - if (item.routeObject) { - return item.routeObject - } - const route = { name: (item.anon || this.currentUser) ? item.route : item.anonRoute } - if (USERNAME_ROUTES.has(route.name)) { - route.params = { username: this.currentUser.screen_name } - } - return route + return routeTo(item, this.currentUser) } }, computed: { |
