Skip to content

Commit 8080026

Browse files
authored
Merge pull request bootstrap-vue#127 from jjonas-gcs/patch-1
href prop isnt needed if object in to prop
2 parents 547abec + 7a4b41d commit 8080026

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/nav-item.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<component
44
:class="classObject"
55
@click="onclick"
6-
:href="href || to"
6+
:href="hrefString"
77
:is="componentType"
88
active-class="active"
99
:to="to"
@@ -28,6 +28,9 @@
2828
},
2929
componentType() {
3030
return this.to ? 'router-link' : 'a';
31+
},
32+
hrefString() {
33+
return typeof this.to === 'object' ? this.href || undefined : this.href || this.to;
3134
}
3235
},
3336
props: {

0 commit comments

Comments
 (0)