Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(base): wait for all chunked requests to arrive before continuing (#…
…4017) Our previous approach of chunking document availability requests did not wait for all the chunks to finish before returning the results. The debounceCollect utility expects an observable that returns all results in one go, but because we returned a stream that would emit the chunks one-by-one as they arrived, we would only handle the first emission, which would not include the whole result set, breaking assumptions further down the line. This patch fixes the issue by reducing over each emission, successively add them to an array. (the reduce operator will wait for the stream to finish before emitting a single reduced value).
- Loading branch information