Skip to content

Commit

Permalink
Check for existance of containerEl on settimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
timceedi authored May 23, 2018
1 parent 2cd5365 commit a6029a7
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 a6029a7

Please sign in to comment.