Skip to content

Commit

Permalink
fix(PivotTable): Pass string only to safeHtmlSpan (#29895)
Browse files Browse the repository at this point in the history
  • Loading branch information
geido authored Aug 8, 2024
1 parent e77f755 commit fb6efb9
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ function displayHeaderCell(
) {
const name = namesMapping[value] || value;
const parsedLabel = parseLabel(name);
const labelContent = allowRenderHtml
? safeHtmlSpan(parsedLabel)
: parsedLabel;
const labelContent =
allowRenderHtml && typeof parsedLabel === 'string'
? safeHtmlSpan(parsedLabel)
: parsedLabel;
return needToggle ? (
<span className="toggle-wrapper">
<span
Expand Down

0 comments on commit fb6efb9

Please sign in to comment.