Fix assign dans constructeur

Pas possible de faire Object.assign(this.position car position == null
This commit is contained in:
2026-07-26 22:57:17 +02:00
parent 882aa5fbcb
commit 9aca2c32ef
+2 -2
View File
@@ -57,7 +57,7 @@ export class RdDCalendrier extends HandlebarsApplicationMixin(foundry.applicatio
this.horlogeAnalogique = true;
const savedPos = game.settings.get(SYSTEM_RDD, "calendrier-pos");
if (savedPos?.top != undefined) {
Object.assign(this.position, { top: savedPos.top, left: savedPos.left, width: 400, height: 400 });
this.position = { top: savedPos.top, left: savedPos.left, width: 400, height: 400 }
this.horlogeAnalogique = savedPos.horlogeAnalogique;
}
this.timestamp = RdDTimestamp.getWorldTime();
@@ -239,7 +239,7 @@ export class RdDCalendrier extends HandlebarsApplicationMixin(foundry.applicatio
/* -------------------------------------------- */
async ajouterNombreAstral(indexDate) {
const nombreAstral = await RdDDice.rollHeure( { showDice: HIDE_DICE, rollMode: "self" });
const nombreAstral = await RdDDice.rollHeure({ showDice: HIDE_DICE, rollMode: "self" });
return {
nombreAstral: nombreAstral,
lectures: [],