Fixed startup crash with seasonal effects
This commit is contained in:
parent
2e55108b6b
commit
eba0c2cc61
@ -73,7 +73,7 @@ export async function mainBoot() {
|
|||||||
mainRouter.push('/search');
|
mainRouter.push('/search');
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
try {
|
||||||
if (defaultStore.state.enableSeasonalScreenEffect) {
|
if (defaultStore.state.enableSeasonalScreenEffect) {
|
||||||
const month = new Date().getMonth() + 1;
|
const month = new Date().getMonth() + 1;
|
||||||
if (defaultStore.state.hemisphere === 'S') {
|
if (defaultStore.state.hemisphere === 'S') {
|
||||||
@ -95,6 +95,10 @@ export async function mainBoot() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// console.error(error);
|
||||||
|
console.error('Failed to initialise the seasonal screen effect canvas context:', error);
|
||||||
|
}
|
||||||
|
|
||||||
if ($i) {
|
if ($i) {
|
||||||
// only add post shortcuts if logged in
|
// only add post shortcuts if logged in
|
||||||
|
@ -155,7 +155,9 @@ export class SnowfallEffect {
|
|||||||
max: 0.125,
|
max: 0.125,
|
||||||
easing: 0.0005,
|
easing: 0.0005,
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* @throws {Error} - Thrown when it fails to get WebGL context for the canvas
|
||||||
|
*/
|
||||||
constructor(options: {
|
constructor(options: {
|
||||||
sakura?: boolean;
|
sakura?: boolean;
|
||||||
}) {
|
}) {
|
||||||
|
Loading…
Reference in New Issue
Block a user