Skip to content

Commit

Permalink
fix: race condition with overlay connect
Browse files Browse the repository at this point in the history
  • Loading branch information
zunderscore committed Jan 2, 2025
1 parent 6b90c5b commit 60a2b4a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/resources/overlay/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ function overlaySocketConnect(){
console.error("Woah, something broke. Abandon ship!");
}
}
overlaySocketConnect();

function sendWebsocketEvent(name, data) {
ws.send(JSON.stringify({
Expand All @@ -141,4 +140,7 @@ function errorHandle(ws){
}
}

loadFonts();
document.addEventListener("DOMContentLoaded", () => {
loadFonts();
overlaySocketConnect();
});

0 comments on commit 60a2b4a

Please sign in to comment.