Fix: error dans les logs si aucune scène active

This commit is contained in:
Vincent Vandemeulebrouck 2023-11-10 19:56:25 +01:00
parent c761aeceb3
commit 14d4638e56

View File

@ -17,7 +17,7 @@ export class AutoAdjustDarkness {
static async adjust(darkness) {
if (AutoAdjustDarkness.isAuto()) {
const scene = game.scenes.viewed;
if (scene.globalLight && scene.tokenVision) {
if (scene?.globalLight && scene?.tokenVision) {
await scene.update({ darkness });
}
}