Skip to content

Commit eb7262d

Browse files
author
Fabien JUIF
authored
Hotfix / svg.parentNode fail with renderer.create( (#48)
1 parent dcb2474 commit eb7262d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

build/TailSpin/TailSpin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var TailSpin = function (_Component) {
3838
var _this = _possibleConstructorReturn(this, (TailSpin.__proto__ || Object.getPrototypeOf(TailSpin)).call(this, props));
3939

4040
_this.setColor = function () {
41-
var parent = _this.svg.parentNode;
41+
var parent = _this.svg && _this.svg.parentNode;
4242
var parentColor = parent ? getBackgroundColor(parent) : undefined;
4343

4444
while (parent && !parentColor) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hoc-react-loader",
3-
"version": "3.1.1",
3+
"version": "3.1.2",
44
"description": "Higher order component to call a load function from props at mount.",
55
"main": "build/index.js",
66
"peerDependencies": {

src/TailSpin/TailSpin.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TailSpin extends Component {
2121
}
2222

2323
setColor = () => {
24-
let parent = this.svg.parentNode
24+
let parent = this.svg && this.svg.parentNode
2525
let parentColor = parent ? getBackgroundColor(parent) : undefined
2626

2727
while (parent && !parentColor) {

0 commit comments

Comments
 (0)