Replace state "deep" option with "shallow" option

This commit is contained in:
Talia 2024-01-17 11:52:41 +01:00
parent 035eeb8fc0
commit 47994975f9
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}