Fix build again
This commit is contained in:
parent
9a4c33b289
commit
40d206cb84
2
src/index.d.ts
vendored
2
src/index.d.ts
vendored
@ -170,7 +170,7 @@ interface LiveAtlasProjection {
|
||||
interface LiveAtlasWorldState {
|
||||
raining: boolean;
|
||||
thundering: boolean;
|
||||
timeOfDay: number;
|
||||
timeOfDay?: number;
|
||||
}
|
||||
|
||||
interface LiveAtlasParsedUrl {
|
||||
|
@ -98,6 +98,10 @@ export class ClockControl extends Control {
|
||||
const timeOfDay = worldState.timeOfDay;
|
||||
let sunAngle;
|
||||
|
||||
if(typeof timeOfDay === 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (timeOfDay > 23100 || timeOfDay < 12900) {
|
||||
//day mode
|
||||
let movedTime = timeOfDay + 900;
|
||||
|
@ -53,7 +53,7 @@ export const getters: GetterTree<State, State> & Getters = {
|
||||
},
|
||||
|
||||
night(state: State): boolean {
|
||||
return getMinecraftTime(state.currentWorldState.timeOfDay).night;
|
||||
return getMinecraftTime(state.currentWorldState.timeOfDay || 0).night;
|
||||
},
|
||||
|
||||
mapBackground(state: State): string {
|
||||
@ -62,7 +62,7 @@ export const getters: GetterTree<State, State> & Getters = {
|
||||
}
|
||||
|
||||
if(state.currentMap.nightAndDay) {
|
||||
if(getMinecraftTime(state.currentWorldState.timeOfDay).night) {
|
||||
if(getMinecraftTime(state.currentWorldState.timeOfDay || 0).night) {
|
||||
return state.currentMap.backgroundNight || state.currentMap.background || 'transparent';
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { mount } from '@vue/test-utils';
|
||||
import PlayerImage from '../../src/Components/PlayerImage.vue';
|
||||
import PlayerImage from '../../src/components/PlayerImage.vue';
|
||||
import {getDefaultPlayerImage, getPlayerImage} from "@/util/images";
|
||||
import {useTestImageProvider} from "../helpers";
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
// @vitest-environment jsdom
|
||||
|
||||
import {mount, VueWrapper} from '@vue/test-utils';
|
||||
import Sidebar from '../../src/Components/Sidebar.vue';
|
||||
import Sidebar from '../../src/components/Sidebar.vue';
|
||||
import {addDynmapServer, addWorld, clearServers, clearWorlds, enablePlayerMarkers} from "../helpers";
|
||||
import {nextTick} from "vue";
|
||||
import {useStore} from "@/store";
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { mount } from '@vue/test-utils';
|
||||
import SVGIcon from '../../src/Components/SVGIcon.vue';
|
||||
import SVGIcon from '../../src/components/SvgIcon.vue';
|
||||
|
||||
describe('SVGIcon', async () => {
|
||||
it('exists', () => {
|
||||
|
@ -16,7 +16,8 @@
|
||||
"baseUrl": ".",
|
||||
"types": [
|
||||
"vite/client",
|
||||
"vue"
|
||||
"vue",
|
||||
"vitest/globals"
|
||||
],
|
||||
"paths": {
|
||||
"@/*": [
|
||||
|
Loading…
Reference in New Issue
Block a user