0.3.1 a new combination is also ready type observer (combination of combination). Set that.

master
David Kebler 2020-07-20 16:22:49 -07:00
parent 7730a94d3d
commit 3e3e46ee24
2 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@uci-utils/ready",
"version": "0.3.0",
"version": "0.3.1",
"description": "A Class to Observe the reduced to boolean combined state of a map of observables",
"main": "src/ready.js",
"scripts": {

View File

@ -137,7 +137,7 @@ class Ready extends Map {
// TODO have combineObservers call this
makeCombination(observers,list){
observers = observers.filter(obs=>obs._readyType)
observers = observers.filter(obs=>(obs || {})._readyType)
if (!observers.length) return false
let combination = combineLatest(observers).pipe(
tap(states => { if (list) this.log(list.map((name,index) => [name,states[index]]))}),
@ -145,6 +145,7 @@ class Ready extends Map {
changed(), //filters out emission if it is unchanged from last TODO replace with distinctUntilChanged
shareReplay(1)
)
combination._readyType = true
return combination
}