Update drr equality (#1469)
* Update drr equality * null === null * Array length compare * isFunction(next.eq) * Just JSON.stringify on compare * Add distinctUntilChanged in rpc-core * prev/next -> a/b
This commit is contained in:
@@ -22,7 +22,9 @@ export const drr = (): DrrResult => <T> (source$: Observable<T>): Observable<T>
|
||||
|
||||
throw error;
|
||||
}),
|
||||
distinctUntilChanged(),
|
||||
distinctUntilChanged((a: any, b: any): boolean =>
|
||||
JSON.stringify({ value: a }) === JSON.stringify({ value: b })
|
||||
),
|
||||
publishReplay(1),
|
||||
refCount()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user