Comparing version 1.8.4 to 1.8.5
@@ -79,22 +79,30 @@ "use strict"; | ||
_this.setState({ | ||
observer: new MutationObserver(function (mutations) { | ||
mutations.forEach(function (mutation) { | ||
if (mutation.type === 'childList' && mutation.addedNodes.length > 0) { | ||
var cb = function cb() { | ||
return stepCallback(mutation.addedNodes[0]); | ||
}; | ||
_this.setState(function (prevState) { | ||
if (prevState.observer) { | ||
setTimeout(function () { | ||
prevState.observer.disconnect(); | ||
}, 0); | ||
} | ||
setTimeout(function () { | ||
return _this.calculateNode(mutation.addedNodes[0], step.position, cb); | ||
}, 100); | ||
} else if (mutation.type === 'childList' && mutation.removedNodes.length > 0) { | ||
var _cb = function _cb() { | ||
return stepCallback(node); | ||
}; | ||
return { | ||
observer: new MutationObserver(function (mutations) { | ||
mutations.forEach(function (mutation) { | ||
if (mutation.type === 'childList' && mutation.addedNodes.length > 0) { | ||
var cb = function cb() { | ||
return stepCallback(mutation.addedNodes[0]); | ||
}; | ||
_this.calculateNode(node, step.position, _cb); | ||
} | ||
}); | ||
}) | ||
setTimeout(function () { | ||
return _this.calculateNode(mutation.addedNodes[0], step.position, cb); | ||
}, 100); | ||
} else if (mutation.type === 'childList' && mutation.removedNodes.length > 0) { | ||
var _cb = function _cb() { | ||
return stepCallback(node); | ||
}; | ||
_this.calculateNode(node, step.position, _cb); | ||
} | ||
}); | ||
}) | ||
}; | ||
}, function () { | ||
@@ -334,2 +342,6 @@ return _this.state.observer.observe(target, config); | ||
} | ||
if (this.state.observer) { | ||
this.state.observer.disconnect(); | ||
} | ||
} | ||
@@ -336,0 +348,0 @@ }, { |
{ | ||
"name": "reactour", | ||
"version": "1.8.4", | ||
"version": "1.8.5", | ||
"description": "Tourist Guide into your React Components", | ||
@@ -52,14 +52,14 @@ "main": "dist/index.js", | ||
"css-loader": "1.0.0", | ||
"eslint": "5.2.0", | ||
"eslint-config-prettier": "^2.9.0", | ||
"eslint": "5.3.0", | ||
"eslint-config-prettier": "3.0.1", | ||
"eslint-plugin-prettier": "2.6.2", | ||
"html-loader": "0.5.5", | ||
"html-webpack-plugin": "3.2.0", | ||
"prettier": "1.13.7", | ||
"react": "16.4.1", | ||
"react-dom": "16.4.1", | ||
"reshake": "1.1.0", | ||
"prettier": "1.14.2", | ||
"react": "16.4.2", | ||
"react-dom": "16.4.2", | ||
"reshake": "1.1.3", | ||
"rimraf": "2.6.2", | ||
"style-loader": "0.21.0", | ||
"webpack": "4.16.1", | ||
"style-loader": "0.22.1", | ||
"webpack": "4.16.5", | ||
"webpack-cli": "3.1.0", | ||
@@ -79,4 +79,4 @@ "webpack-dev-server": "3.1.5" | ||
"scrollparent": "2.0.1", | ||
"styled-components": "3.3.3" | ||
"styled-components": "3.4.2" | ||
} | ||
} |
63848
1179
+ Addedstyled-components@3.4.2(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedisobject@3.0.1(transitive)
- Removedstyled-components@3.3.3(transitive)
Updatedstyled-components@3.4.2