Skip to content

Commit cf2cbc8

Browse files
committed
fixed navigatior undefined bugs
1 parent fc80ef6 commit cf2cbc8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/routes/+page.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@
6363
</p>
6464
<div class="information">
6565
<!-- none of this information is statefull, therefore none of it will update. this is intended behavior -->
66-
<b>Running Information:</b><br />
67-
Browser: {navigator.userAgent}<br />
66+
<b>Running Information:</b>
67+
Browser: {browser && navigator.userAgent}<br />
6868
Host: {browser && window.location.hostname}<br />
6969
DevMode: {SessionState.devMode}<br />
7070
AdBlock: {SessionState.adBlockEnabled}<br />
7171
Current Server: {State.currentServer.name} (Loaded {State.servers
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 === window.location.hostname ? 'green' : 'red'}">${h.hostname}</span>`
75+
`<span style="color:${h.hostname === (browser && 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)