From 5b751b7ba4b8e0830d71da79eff31798058f79c4 Mon Sep 17 00:00:00 2001 From: Chi Vinh Le Date: Tue, 1 Aug 2017 20:32:49 +0700 Subject: [PATCH] Fix Safari issues for popups --- client/coral-framework/components/Popup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/coral-framework/components/Popup.js b/client/coral-framework/components/Popup.js index b9393a36d..1fe3408ea 100644 --- a/client/coral-framework/components/Popup.js +++ b/client/coral-framework/components/Popup.js @@ -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(); }