Hello, we have an issue on a game which is create a blocking game :
https://boardgamearena.com/table?table= ... d=83881525
why in the file of the current gamememoir.js of game 75725443026 I can see :
onEnteringState(e, t) {
this.inherited(arguments);
if (t.args && t.args.currentAttack) {
let e = t.args.currentAttack;
e.unitId && $(unit-${e.unitId}).classList.add("attacking");
e.oppUnitId ? $(unit-${e.oppUnitId}).classList.add("attacked") : $(cell-${e.x}-${e.y}).classList.add("attacked")
}
in this case .classList.add("attacking"); is generating "Uncaught (in promise) TypeError: Cannot read properties of null (reading 'classList')
But on the other side the current memoir.js : is having another syntax :
onEnteringState(stateName, args) {
this.inherited(arguments);
// Highlight current attack
if (args.args && args.args.currentAttack) {
let attack = args.args.currentAttack;
if (attack.unitId) {
$(unit-${attack.unitId}).classList.add('attacking');
}
so why do we have different syntax ?
https://boardgamearena.com/table?table= ... d=83881525
why in the file of the current gamememoir.js of game 75725443026 I can see :
onEnteringState(e, t) {
this.inherited(arguments);
if (t.args && t.args.currentAttack) {
let e = t.args.currentAttack;
e.unitId && $(unit-${e.unitId}).classList.add("attacking");
e.oppUnitId ? $(unit-${e.oppUnitId}).classList.add("attacked") : $(cell-${e.x}-${e.y}).classList.add("attacked")
}
in this case .classList.add("attacking"); is generating "Uncaught (in promise) TypeError: Cannot read properties of null (reading 'classList')
But on the other side the current memoir.js : is having another syntax :
onEnteringState(stateName, args) {
this.inherited(arguments);
// Highlight current attack
if (args.args && args.args.currentAttack) {
let attack = args.args.currentAttack;
if (attack.unitId) {
$(unit-${attack.unitId}).classList.add('attacking');
}
so why do we have different syntax ?