Skip to content

Commit

Permalink
Merge pull request #3827 from nextcloud/fix/3824/button-default-slot
Browse files Browse the repository at this point in the history
Don't fail if `NcButton` default slot contains not only text
  • Loading branch information
raimund-schluessler committed Feb 27, 2023
2 parents d59426a + 2646312 commit 70c9c60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NcButton/NcButton.vue
Expand Up @@ -310,7 +310,7 @@ export default {
* @return {object|undefined} The created VNode
*/
render(h) {
const text = this.$slots.default?.[0]?.text.trim()
const text = this.$slots.default?.[0]?.text?.trim?.()
const hasText = !!text
const hasIcon = this.$slots?.icon
Expand Down

0 comments on commit 70c9c60

Please sign in to comment.