We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ee3913 commit c6b838eCopy full SHA for c6b838e
src/vue-2-breadcrumbs.js
@@ -4,7 +4,7 @@ export default {
4
$breadcrumbs: {
5
get() {
6
const breadcrumbs = this.$route.matched.map(routeRecord => {
7
- let path = routeRecord.path.length ? routeRecord.path : '/';
+ let path = routeRecord.path.length > 0 ? routeRecord.path : '/';
8
let route = routeRecord;
9
10
Object.keys(this.$route.params).forEach(param => {
@@ -24,7 +24,7 @@ export default {
24
const defaults = {
25
methods: {
26
getBreadcrumb: function (bc) {
27
- return typeof bc === 'function' ? bc(this.$route.params) : bc;
+ return typeof bc === 'function' ? bc.call(this, this.$route.params) : bc;
28
}
29
},
30
template: `
0 commit comments