mirror of
https://github.com/Start9Labs/patch-db.git
synced 2026-03-31 04:13:39 +00:00
chore: send initial value to subscribers
This commit is contained in:
committed by
Lucy Cifferello
parent
770602169e
commit
440b1ba048
@@ -33,6 +33,7 @@ export class Store<T extends { [key: string]: any }> {
|
|||||||
const path = `/${args.join('/')}`
|
const path = `/${args.join('/')}`
|
||||||
if (!this.watchedNodes[path]) {
|
if (!this.watchedNodes[path]) {
|
||||||
this.watchedNodes[path] = new ReplaySubject(1)
|
this.watchedNodes[path] = new ReplaySubject(1)
|
||||||
|
this.updateValue(path)
|
||||||
}
|
}
|
||||||
return this.watchedNodes[path].asObservable()
|
return this.watchedNodes[path].asObservable()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user