diff --git a/infodisplay/infodisplay.js b/infodisplay/infodisplay.js index 5f1364a..406c6c7 100644 --- a/infodisplay/infodisplay.js +++ b/infodisplay/infodisplay.js @@ -85,13 +85,16 @@ function DisplayParticipant(broker, role, defaultUrls, timer) { window.onmessage = null; const now = new Date(); if (!event.data - || !event.data.waitUntil - || event.data.waitUntil < now.getTime()) { + || !event.data.waitUntil) { return; } if (timeout) { clearTimeout(timeout); } + if (event.data.waitUntil < now.getTime()) { + participant.send('open', getRotationUrl(urls, indata)); + return; + } timeout = setTimeout(() => { participant.send('open', getRotationUrl(urls, indata)); }, event.data.waitUntil - now.getTime());