fix getMessages getting called multiple times in parallel
This commit is contained in:
parent
a4d062fa52
commit
5c84a2cbf8
|
@ -12,7 +12,7 @@ checkMessages();
|
||||||
// start to look for messages
|
// start to look for messages
|
||||||
function checkMessages() {
|
function checkMessages() {
|
||||||
let notifications = document.getElementById('notifications');
|
let notifications = document.getElementById('notifications');
|
||||||
if (notifications) {
|
if (notifications && notifications.childNodes.length === 0 ) {
|
||||||
let dataOrigin = notifications.getAttribute('data');
|
let dataOrigin = notifications.getAttribute('data');
|
||||||
getMessages(dataOrigin);
|
getMessages(dataOrigin);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue