Skip to content

Commit 761d842

Browse files
committed
when loading trigger check session immediately, rather than after checkSessionInterval DuendeArchive#557
1 parent a762a74 commit 761d842

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/CheckSessionIFrame.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,15 @@ export class CheckSessionIFrame {
6666

6767
this._session_state = session_state;
6868

69-
this._timer = window.setInterval(() => {
69+
let send = () => {
7070
this._frame.contentWindow.postMessage(this._client_id + " " + this._session_state, this._frame_origin);
71-
}, this._interval);
71+
};
72+
73+
// trigger now
74+
send();
75+
76+
// and setup timer
77+
this._timer = window.setInterval(send, this._interval);
7278
}
7379
}
7480

0 commit comments

Comments
 (0)