Fix: error dans les logs si aucune scène active
This commit is contained in:
parent
c761aeceb3
commit
14d4638e56
@ -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 });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user