fix setControls to do union with existing controls

This commit is contained in:
Alex McLean 2025-10-08 14:52:00 +01:00
parent fdde05e751
commit 086596c47c

View file

@ -19,9 +19,9 @@ export class State {
return this.setSpan(func(this.span));
}
// Returns new State with different controls
// Returns new State with added controls.
setControls(controls) {
return new State(this.span, controls);
return new State(this.span, {...this.controls, ...controls});
}
}