Skip to content

Commit

Permalink
#22 fix: no lock check for ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
L3P3 committed Jul 22, 2024
1 parent 3ec37e5 commit 725ae58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minicraft",
"version": "0.10.3",
"version": "0.10.4",
"description": "voxel-based 3d game, written in javascript",
"homepage": "https://l3p3.de/minicraft",
"repository": {
Expand Down
5 changes: 4 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ function ErrorOpened() {
];
}

if (BroadcastChannel_) {
if (window.SSR) {
init(Root);
}
else if (BroadcastChannel_) {
const channel_lock = new BroadcastChannel_('minicraft.lock');
const timeout = setTimeout_(() => {
init(Root);
Expand Down

0 comments on commit 725ae58

Please sign in to comment.