Skip to content

Commit

Permalink
Fix Cannot read property 'style' of null.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanta Asada committed Jun 28, 2018
1 parent 1f22344 commit 1f6ff85
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,19 +236,22 @@ class Popover extends React.Component {
of the container. When tip changes orientation position due to changes from/to `row`/`column`
width`/`height` will be impacted. Our layout monitoring will catch these cases and automatically
recalculate layout. */

this.containerEl.style.flexFlow = zone.flow
this.containerEl.style[
jsprefix("FlexFlow")
] = this.containerEl.style.flexFlow
if (this.containerEl) {
this.containerEl.style.flexFlow = zone.flow
this.containerEl.style[
jsprefix("FlexFlow")
] = this.containerEl.style.flexFlow
}
this.bodyEl.style.order = zone.order
this.bodyEl.style[jsprefix("Order")] = this.bodyEl.style.order

/* Apply Absolute Positioning. */

log("pos", pos)
this.containerEl.style.top = `${pos.y}px`
this.containerEl.style.left = `${pos.x}px`
if (this.containerEl) {
this.containerEl.style.top = `${pos.y}px`
this.containerEl.style.left = `${pos.x}px`
}

/* Calculate Tip Position */

Expand Down

0 comments on commit 1f6ff85

Please sign in to comment.