react-warp-portal
Advanced tools
Comparing version 2.1.1 to 2.2.0-delta
@@ -14,4 +14,6 @@ 'use strict'; | ||
var _destinations = []; | ||
var _refreshQueued = false; | ||
function refresh() { | ||
_refreshQueued = false; | ||
_destinations.forEach(function (instance) { | ||
@@ -34,18 +36,27 @@ return instance.forceUpdate(); | ||
componentDidMount: function componentDidMount() { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: ReactDOM.findDOMNode(this) | ||
}; | ||
window.requestAnimationFrame(refresh); | ||
if (this.props.content) { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: ReactDOM.findDOMNode(this) | ||
}; | ||
if (!_refreshQueued) { | ||
_refreshQueued = true; | ||
window.requestAnimationFrame(refresh); | ||
} | ||
} | ||
}, | ||
componentDidUpdate: function componentDidUpdate() { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: ReactDOM.findDOMNode(this) | ||
}; | ||
refresh(); | ||
if (this.props.content || activeInstances[this.state.id]) { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: ReactDOM.findDOMNode(this) | ||
}; | ||
refresh(); | ||
} | ||
}, | ||
componentWillUnmount: function componentWillUnmount() { | ||
delete activeInstances[this.state.id]; | ||
refresh(); | ||
if (activeInstances[this.state.id]) { | ||
delete activeInstances[this.state.id]; | ||
refresh(); | ||
} | ||
}, | ||
@@ -52,0 +63,0 @@ render: function render() { |
@@ -25,4 +25,6 @@ 'use strict'; | ||
var _destinations = []; | ||
var _refreshQueued = false; | ||
function refresh() { | ||
_refreshQueued = false; | ||
_destinations.forEach(function (instance) { | ||
@@ -45,18 +47,27 @@ return instance.forceUpdate(); | ||
componentDidMount: function componentDidMount() { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: _reactDom2['default'].findDOMNode(this) | ||
}; | ||
window.requestAnimationFrame(refresh); | ||
if (this.props.content) { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: _reactDom2['default'].findDOMNode(this) | ||
}; | ||
if (!_refreshQueued) { | ||
_refreshQueued = true; | ||
window.requestAnimationFrame(refresh); | ||
} | ||
} | ||
}, | ||
componentDidUpdate: function componentDidUpdate() { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: _reactDom2['default'].findDOMNode(this) | ||
}; | ||
refresh(); | ||
if (this.props.content || activeInstances[this.state.id]) { | ||
activeInstances[this.state.id] = { | ||
children: this.props.content, | ||
element: _reactDom2['default'].findDOMNode(this) | ||
}; | ||
refresh(); | ||
} | ||
}, | ||
componentWillUnmount: function componentWillUnmount() { | ||
delete activeInstances[this.state.id]; | ||
refresh(); | ||
if (activeInstances[this.state.id]) { | ||
delete activeInstances[this.state.id]; | ||
refresh(); | ||
} | ||
}, | ||
@@ -63,0 +74,0 @@ render: function render() { |
{ | ||
"name": "react-warp-portal", | ||
"version": "2.1.1", | ||
"version": "2.2.0-delta", | ||
"description": "react-warp-portal React component", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
2563285
15
19714
1
67
3
5