Skip to content

Commit 523e3a2

Browse files
author
pooya parsa
committed
fix(breadcrumb-item): correctly set domProps when no children provided
1 parent 8b086a9 commit 523e3a2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/components/breadcrumb/breadcrumb-link.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { mergeData } from 'vue-functional-data-merge'
22
import pluckProps from '../../utils/pluck-props'
33
import { assign } from '../../utils/object'
44
import BLink, { propsFactory as linkPropsFactory } from '../link/link'
5+
import { htmlOrText } from '../../utils/html'
56

67
export const props = assign(linkPropsFactory(), {
78
text: {
@@ -41,10 +42,10 @@ export default {
4142
componentData.attrs = { href: suppliedProps.href }
4243
}
4344

44-
return h(
45-
tag,
46-
mergeData(data, componentData),
47-
children || suppliedProps.html || suppliedProps.text
48-
)
45+
if (!children) {
46+
componentData.domProps = htmlOrText(suppliedProps.html, suppliedProps.text)
47+
}
48+
49+
return h(tag, mergeData(data, componentData), children)
4950
}
5051
}

0 commit comments

Comments
 (0)