Skip to content

Commit

Permalink
[Bump 2.4.2] setTimeout in jest will not have instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed May 21, 2018
1 parent 568cd8d commit e91da02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-trigger",
"version": "2.4.1",
"version": "2.4.2",
"description": "base abstract trigger component for react",
"keywords": [
"react",
Expand Down
4 changes: 3 additions & 1 deletion src/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ class Popup extends Component {
if (!stretchChecked) {
sizeStyle.visibility = 'hidden';
setTimeout(() => {
this.alignInstance.forceAlign();
if (this.alignInstance) {
this.alignInstance.forceAlign();
}
}, 0);
}
}
Expand Down

0 comments on commit e91da02

Please sign in to comment.