Fix build

This commit is contained in:
James Lyne 2021-05-20 15:30:55 +01:00
parent 9473754313
commit 17540b6279
3 changed files with 9 additions and 5 deletions

View File

@ -63,7 +63,7 @@ export default defineComponent({
return; return;
} }
const error = `Failed to load server configuration for '${store.state.currentServer.id}'`; const error = `Failed to load server configuration for '${store.state.currentServer!.id}'`;
console.error(`${error}:`, e); console.error(`${error}:`, e);
window.showSplashError(`${error}\n${e}`, false, ++configAttempts.value); window.showSplashError(`${error}\n${e}`, false, ++configAttempts.value);
setTimeout(() => loadConfiguration(), 1000); setTimeout(() => loadConfiguration(), 1000);
@ -126,7 +126,7 @@ export default defineComponent({
watch(title, (title) => document.title = title); watch(title, (title) => document.title = title);
watch(currentUrl, (url) => window.history.replaceState({}, '', url)); watch(currentUrl, (url) => window.history.replaceState({}, '', url));
watch(currentServer, (newServer: LiveAtlasServerDefinition) => { watch(currentServer, (newServer?: LiveAtlasServerDefinition) => {
window.showSplash(); window.showSplash();
stopUpdates(); stopUpdates();

View File

@ -15,8 +15,8 @@
--> -->
<template> <template>
<li :class="{'server': true, 'server--selected': server.id === currentServer.id}"> <li :class="{'server': true, 'server--selected': currentServer && server.id === currentServer.id}">
<button type="button" :class="{'active': server.id === currentServer.id}" <button type="button" :class="{'active': currentServer && server.id === currentServer.id}"
:title="server.label || server.id" @click="setCurrentServer(server.id)">{{ server.label || server.id }} :title="server.label || server.id" @click="setCurrentServer(server.id)">{{ server.label || server.id }}
</button> </button>
</li> </li>

View File

@ -166,7 +166,11 @@ export const state: State = {
}, },
currentZoom: 0, currentZoom: 0,
currentProjection: new DynmapProjection(), //Projection for converting location <-> latlg. Object itself isn't reactive for performance reasons currentProjection: new DynmapProjection({
mapToWorld: [0, 0, 0, 0, 0, 0, 0, 0, 0],
worldToMap: [0, 0, 0, 0, 0, 0, 0, 0, 0],
nativeZoomLevels: 1
}), //Projection for converting location <-> latlg. Object itself isn't reactive for performance reasons
currentWorldState: { currentWorldState: {
raining: false, raining: false,
thundering: false, thundering: false,