Skip to content

Commit

Permalink
chore: fix docs drupal and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Aug 27, 2024
1 parent 1be8f96 commit aeb593b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:

test_e2e:
machine:
image: ubuntu-2204:edge
image: ubuntu-2204:current
working_directory: ~/repo
environment:
DDEV_NONINTERACTIVE: "true"
Expand Down
10 changes: 6 additions & 4 deletions docs/drupal/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
},
"patches": {
"drupal/druxt": {
"https://www.drupal.org/project/druxt/issues/3273228": "https://git.drupalcode.org/project/druxt/-/merge_requests/9.diff"
},
"drupal/decoupled_router": {
"https://www.drupal.org/project/decoupled_router/issues/3111456": "https://git.drupalcode.org/project/decoupled_router/-/merge_requests/11.diff"
"https://www.drupal.org/project/decoupled_router/issues/3172926": "https://www.drupal.org/files/issues/2020-09-24/3172926-2.patch",
"https://www.drupal.org/project/decoupled_router/issues/3468825": "https://git.drupalcode.org/project/decoupled_router/-/merge_requests/20.diff"
},
"drupal/druxt": {
"#3315030 - Add a wildcard route translator": "https://git.drupalcode.org/project/druxt/-/merge_requests/11.diff",
"https://www.drupal.org/project/druxt/issues/3467742": "https://git.drupalcode.org/project/druxt/-/merge_requests/14.diff"
},
"drupal/jsonapi_menu_items": {
"https://www.drupal.org/project/jsonapi_menu_items/issues/3192576": "https://www.drupal.org/files/issues/2023-02-10/3192576-18.patch"
Expand Down
6 changes: 3 additions & 3 deletions docs/drupal/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/router/src/components/DruxtRouter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export default {
const result = await store.dispatch('druxtRouter/get', route.fullPath)
// Process redirect.
if (result.redirect) {
if (result?.redirect) {
redirect(result.redirect)
}
},
Expand Down
4 changes: 2 additions & 2 deletions packages/router/src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ class DruxtRouter {
* @returns {boolean|string} The redirect path or false.
*/
getRedirect (path, route = {}) {
const prefix = (route.props || {}).langcode || ''
const prefix = route.props?.langcode || ''

// Redirect to route provided redirect.
if (((route.redirect || [])[0] || {}).to) {
if (route.redirect?.[0]?.to) {
return route.redirect[0].to
}
const url = Url(path)
Expand Down

0 comments on commit aeb593b

Please sign in to comment.