const addendum = null
const acts.change = [act1];
console.log( acts.change.concat(addendum?.changedActions) );
产出[act1, null]
而不是预期[act1]
。我是在滥用空条件运算符还是
console.log( addendum ? acts.change.concat(addendum?.changedActions) : acts.change )
获得我想要的东西的最好/最简单的方法?