Skip to content

Commit

Permalink
Merge pull request #520 from eseQ/patch-1
Browse files Browse the repository at this point in the history
fix(wrapper): consistent classname for ssr hydrate
  • Loading branch information
aronhelser committed Nov 4, 2019
2 parents 11ee685 + c5c6974 commit f3a317c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -569,10 +569,11 @@ class ReactTooltip extends React.Component {
if (ReactTooltip.supportedWrappers.indexOf(Wrapper) < 0) {
Wrapper = ReactTooltip.defaultProps.wrapper
}
const wrapperClassName = [tooltipClass, extraClass].filter(Boolean).join(' ')

if (html) {
return (
<Wrapper className={`${tooltipClass} ${extraClass}`}
<Wrapper className={wrapperClassName}
id={this.props.id}
ref={ref => this.tooltipRef = ref}
{...ariaProps}
Expand All @@ -581,7 +582,7 @@ class ReactTooltip extends React.Component {
)
} else {
return (
<Wrapper className={`${tooltipClass} ${extraClass}`}
<Wrapper className={wrapperClassName}
id={this.props.id}
{...ariaProps}
ref={ref => this.tooltipRef = ref}
Expand Down

0 comments on commit f3a317c

Please sign in to comment.