Skip to content

Commit

Permalink
Merge pull request #179 from timceedi/master
Browse files Browse the repository at this point in the history
Fix issue 168: Check for existence of containerEl on setTimeout
  • Loading branch information
jasonkuhrt authored May 23, 2018
2 parents 2cd5365 + a6029a7 commit ded5e6e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,12 @@ class Popover extends React.Component {
this.setState({ exiting: true })
this.exitingAnimationTimer2 = setTimeout(() => {
setTimeout(() => {
this.containerEl.style.transform = `${flowToPopoverTranslations[
this.zone.flow
]}(${this.zone.order * 50}px)`
this.containerEl.style.opacity = "0"
if (this.containerEl) {
this.containerEl.style.transform = `${flowToPopoverTranslations[
this.zone.flow
]}(${this.zone.order * 50}px)`
this.containerEl.style.opacity = "0"
}
}, 0)
}, 0)

Expand Down

0 comments on commit ded5e6e

Please sign in to comment.