Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
skipFirst = false;
} else {
once && stop();
const oldState = this._currentState;
this._currentState = fromStateObject(newState);
_internal.processChangedAtom(this, oldState, this.version++);
}
}
};
const cleanup = () => {
alreadyStopped = true;
this._baseConnectionStopper = undefined;
};
const mBase = materialize(this.base) as _internal.BaseDerivable>;
const stopper = _internal.Reactor.create(mBase, update, opts, cleanup);
if (!alreadyStopped) {
this._baseConnectionStopper = stopper;
}
super[_internal.symbols.connect]();
}
return new Observable((subscriber: Subscriber) => {
return _internal.Reactor.create(derivable as _internal.BaseDerivable,
value => subscriber.next(value),
options,
() => subscriber.closed || subscriber.complete(),
);
});
}