Browse Source

fix: breadcrumbs url formatting on 3rd level and higher + missing locale (#930)

pull/1163/head
NGPixel 5 years ago
parent
commit
c83eb25514
1 changed files with 2 additions and 1 deletions
  1. 3
      client/themes/default/components/page.vue

3
client/themes/default/components/page.vue

@ -345,9 +345,10 @@ export default {
} }
}, },
breadcrumbs() { breadcrumbs() {
console.info(this.locale)
return [{ path: '/', name: 'Home' }].concat(_.reduce(this.path.split('/'), (result, value, key) => { return [{ path: '/', name: 'Home' }].concat(_.reduce(this.path.split('/'), (result, value, key) => {
result.push({ result.push({
path: _.map(result, 'path').join('/') + `/${value}`,
path: _.get(_.last(result), 'path', `/${this.locale}`) + `/${value}`,
name: value name: value
}) })
return result return result

Loading…
Cancel
Save