Skip to content

Commit

Permalink
Hotfix / svg.parentNode fail with renderer.create( (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien JUIF authored Feb 16, 2017
1 parent dcb2474 commit eb7262d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/TailSpin/TailSpin.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var TailSpin = function (_Component) {
var _this = _possibleConstructorReturn(this, (TailSpin.__proto__ || Object.getPrototypeOf(TailSpin)).call(this, props));

_this.setColor = function () {
var parent = _this.svg.parentNode;
var parent = _this.svg && _this.svg.parentNode;
var parentColor = parent ? getBackgroundColor(parent) : undefined;

while (parent && !parentColor) {
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": "hoc-react-loader",
"version": "3.1.1",
"version": "3.1.2",
"description": "Higher order component to call a load function from props at mount.",
"main": "build/index.js",
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/TailSpin/TailSpin.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TailSpin extends Component {
}

setColor = () => {
let parent = this.svg.parentNode
let parent = this.svg && this.svg.parentNode
let parentColor = parent ? getBackgroundColor(parent) : undefined

while (parent && !parentColor) {
Expand Down

0 comments on commit eb7262d

Please sign in to comment.