Skip to content

Commit

Permalink
fix bugs of "getBoundingClientRect() of null"
Browse files Browse the repository at this point in the history
  • Loading branch information
expade committed May 5, 2017
1 parent 6947b8a commit 9c04234
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index_script.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index_script.js.map

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions lib/components/PickyDateTime/Clock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ var Clock = function (_React$Component) {
_createClass(Clock, [{
key: 'initCoordinates',
value: function initCoordinates() {
if (this.clockCenter == null) {
return;
}
var centerPoint = _reactDom2.default.findDOMNode(this.clockCenter);
var centerPointPos = centerPoint.getBoundingClientRect();
var top = centerPointPos.top,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-picky-date-time",
"version": "1.1.4",
"version": "1.1.5",
"description": "a react date time picker component",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit 9c04234

Please sign in to comment.