mirror of
https://github.com/wassname/talk.git
synced 2026-07-13 17:45:56 +08:00
Fix Safari issues for popups
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user