Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
acharneski committed Mar 25, 2024
1 parent fec192d commit bdb2414
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions webui/src/main/resources/application/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ function onWebSocketText(event) {
const messageId = event.data.substring(0, firstCommaIndex);
const messageVersion = event.data.substring(firstCommaIndex + 1, secondCommaIndex);
const messageContent = event.data.substring(secondCommaIndex + 1);
if (messageVersion <= (messageVersions[messageId] || 0)) {
console.log("Ignoring message with id " + messageId + " and version " + messageVersion);
return;
} else {
// if (messageVersion <= (messageVersions[messageId] || 0)) {
// console.log("Ignoring message with id " + messageId + " and version " + messageVersion);
// return;
// } else {
messageVersions[messageId] = messageVersion;
messageMap[messageId] = messageContent;
}
// }
// Cleanup: remove temporary event listeners

const messageDivs = document.querySelectorAll('[id="' + messageId + '"]');
Expand Down

0 comments on commit bdb2414

Please sign in to comment.