fix setControls to do union with existing controls
This commit is contained in:
parent
fdde05e751
commit
086596c47c
1 changed files with 2 additions and 2 deletions
|
|
@ -19,9 +19,9 @@ export class State {
|
||||||
return this.setSpan(func(this.span));
|
return this.setSpan(func(this.span));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns new State with different controls
|
// Returns new State with added controls.
|
||||||
setControls(controls) {
|
setControls(controls) {
|
||||||
return new State(this.span, controls);
|
return new State(this.span, {...this.controls, ...controls});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue