@bigbinary/neeto-rules-frontend 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +16 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -1748,20 +1748,29 @@ var Router = /*#__PURE__*/function (_React$Component) {
|
|
|
1748
1748
|
_this._pendingLocation = null;
|
|
1749
1749
|
if (!props.staticContext) {
|
|
1750
1750
|
_this.unlisten = props.history.listen(function (location) {
|
|
1751
|
-
|
|
1752
|
-
_this.setState({
|
|
1753
|
-
location: location
|
|
1754
|
-
});
|
|
1755
|
-
} else {
|
|
1756
|
-
_this._pendingLocation = location;
|
|
1757
|
-
}
|
|
1751
|
+
_this._pendingLocation = location;
|
|
1758
1752
|
});
|
|
1759
1753
|
}
|
|
1760
1754
|
return _this;
|
|
1761
1755
|
}
|
|
1762
1756
|
var _proto = Router.prototype;
|
|
1763
1757
|
_proto.componentDidMount = function componentDidMount() {
|
|
1758
|
+
var _this2 = this;
|
|
1764
1759
|
this._isMounted = true;
|
|
1760
|
+
if (this.unlisten) {
|
|
1761
|
+
// Any pre-mount location changes have been captured at
|
|
1762
|
+
// this point, so unregister the listener.
|
|
1763
|
+
this.unlisten();
|
|
1764
|
+
}
|
|
1765
|
+
if (!this.props.staticContext) {
|
|
1766
|
+
this.unlisten = this.props.history.listen(function (location) {
|
|
1767
|
+
if (_this2._isMounted) {
|
|
1768
|
+
_this2.setState({
|
|
1769
|
+
location: location
|
|
1770
|
+
});
|
|
1771
|
+
}
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1765
1774
|
if (this._pendingLocation) {
|
|
1766
1775
|
this.setState({
|
|
1767
1776
|
location: this._pendingLocation
|