Merge pull request #824 from coralproject/fix-popup-safari-errors

Fix Safari issues for popups
This commit is contained in:
Kim Gardner
2017-08-01 11:11:14 -04:00
committed by GitHub
+2 -2
View File
@@ -42,14 +42,14 @@ export default class Popup extends Component {
this.onUnload();
const interval = setInterval(() => {
if (this.ref.onload === null) {
if (this.ref && this.ref.onload === null) {
this.setCallbacks();
clearInterval(interval);
}
}, 50);
this.detectCloseInterval = setInterval(() => {
if (this.ref.closed) {
if (!this.ref || this.ref.closed) {
clearInterval(this.detectCloseInterval);
this.onClose();
}