diff --git a/module/time/auto-adjust-darkness.js b/module/time/auto-adjust-darkness.js index 8b0838ed..09ecdf5a 100644 --- a/module/time/auto-adjust-darkness.js +++ b/module/time/auto-adjust-darkness.js @@ -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 }); } }