You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SplitButton.js:392 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'textContent')
at SplitButton.get (SplitButton.js:392:1)
at block0 (SplitButtonTemplate.lit.js:4:1)
at executeTemplate (executeTemplate.js:14:1)
at updateShadowRoot (updateShadowRoot.js:17:1)
at SplitButton._render (UI5Element.js:576:1)
at renderImmediately (Render.js:40:1)
at SplitButton.connectedCallback (UI5Element.js:122:1)
Priority
Low
Medium
High
Very High
The text was updated successfully, but these errors were encountered:
When the default slot is empty, e.g no text is provided, the this.text[0].textContent throws an error.
Instead, call to this.textContent is sufficient.
Fixes: #4609
Bug Description
If a use a
ui5-split-button
without a text (e.g. just anicon
), a JS error is thrown.Expected Behavior
No error should be thrown
Steps to Reproduce
Isolated Example
https://codesandbox.io/s/great-rgb-q7umb?file=/src/App.js
Context
ui5-split-button
Log Output / Stack Trace / Screenshots
Priority
The text was updated successfully, but these errors were encountered: