Skip to content

Commit 748ffb1

Browse files
committed
i found the bug
1 parent cf2cbc8 commit 748ffb1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/state.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const State = createState({
6060
homeView: "grid",
6161
pinnedGames: [],
6262
games: [],
63-
isAHost: () => (AHosts.some((h): boolean => h.hostname === State.currentServer.hostname)),
63+
isAHost: () => (AHosts.some((h): boolean => browser && h.hostname === window.location.hostname)),
6464
localPlays: 0
6565
});
6666

src/routes/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
.length})<br />
7373
AHost: {State.isAHost()} (Loaded {State.aHosts.length})<br />
7474
AHosts: {@html State.aHosts.map(h =>
75-
`<span style="color:${h.hostname === (browser && window.location.hostname) ? 'green' : 'red'}">${h.hostname}</span>`
75+
`<span style="color:${browser && h.hostname === (window.location.hostname) ? 'green' : 'red'}">${h.hostname}</span>`
7676
).join(", ")}
7777
<br />
7878
Games Loaded: {games.length} ({State.pinnedGames.length} pinned) - rendered

0 commit comments

Comments
 (0)