Skip to content

Commit

Permalink
fix(index.js): add missing argument so tooltip hides.
Browse files Browse the repository at this point in the history
If getContent returns '', the tooltip should hide. A missing
argument caused this not to work for dynamic content.
  • Loading branch information
aronhelser committed Mar 7, 2018
1 parent 10b8e43 commit 4d3661b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -295,7 +295,7 @@ class ReactTooltip extends Component {
this.intervalUpdateContent = setInterval(() => {
if (this.mount) {
const {getContent} = this.props
const placeholder = getTipContent(originTooltip, getContent[0](), isMultiline)
const placeholder = getTipContent(originTooltip, '', getContent[0](), isMultiline)
const isEmptyTip = typeof placeholder === 'string' && placeholder === ''
this.setState({
placeholder,
Expand Down

0 comments on commit 4d3661b

Please sign in to comment.