Replace state "deep" option with "shallow" option
This commit is contained in:
parent
035eeb8fc0
commit
47994975f9
1 changed files with 1 additions and 1 deletions
2
state.js
2
state.js
|
@ -65,7 +65,7 @@ export class State extends SimpleState {
|
|||
const old = this.get(prop)
|
||||
if (old !== value) {
|
||||
this.emit(prop, value)
|
||||
if (this.#options.deep !== false) {
|
||||
if (this.#options.shallow) {
|
||||
if (State.isState(old)) this.disown(prop, old)
|
||||
if (State.isState(value)) this.adopt(prop, value)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue