update (val, skipfn) {
		// Return without modification if done or currently locked
		if (this[_done] || this[_locked] || val === _hold) {
			return this;
		}
		else if (this[_isactive]()) {
			if (val === _pending) {
				// Set pending (explicit)
				return this[_set]();
			}
			else if (isThenable(val)) {
				// Update once thenable resolves/rejects
				val.then(res => this.update(res), rej => this.error(rej));
				// Set pending (implicit) until thenable resolves
				return this[_set]();
			}
			return this[_upd](val, false, skipfn);
		}
		return this.cancel(val);
	}
// Checks if any children are active, then updates or cancels accordingly
Checks if any children are active, then updates or cancels accordingly
Checks if any children are active then updates or cancels accordingly
update (val, skipfn) {
		if (this[_done] || this[_locked] || val === _hold) {
			return this;
		}
		else if (this[_isactive]()) {
			if (val === _pending) {
				return this[_set]();
			}
			else if (isThenable(val)) {
				val.then(res => this.update(res), rej => this.error(rej));
				return this[_set]();
			}
			return this[_upd](val, false, skipfn);
		}
		return this.cancel(val);
	}
update ( val , skipfn ) { if ( this [ _done ] || this [ _locked ] || val === _hold ) { return this ; } else if ( this [ _isactive ] ( ) ) { if ( val === _pending ) { return this [ _set ] ( ) ; } else if ( isThenable ( val ) ) { val . then ( res => this . update ( res ) , rej => this . error ( rej ) ) ; return this [ _set ] ( ) ; } return this [ _upd ] ( val , false , skipfn ) ; } return this . cancel ( val ) ; }
Checks if any children are active, then updates or cancels accordingly
Checks if any children are active then updates or cancels accordingly
// Return without modification if done or currently locked // Set pending (explicit) // Update once thenable resolves/rejects // Set pending (implicit) until thenable resolves