Skip to content

Commit

Permalink
Merge pull request #183 from wamazing/master
Browse files Browse the repository at this point in the history
Fix: Cannot read property 'style' of null
  • Loading branch information
jasonkuhrt committed Jun 29, 2018
2 parents 1f22344 + 2a86e7f commit 926ac39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"license": "MIT",
"version": "0.5.7",
"version": "0.5.8",
"scripts": {
"clean": "rm -rf build",
"deploy-storybook": "storybook-to-ghpages",
Expand Down
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 926ac39

Please sign in to comment.