- There are essentially two calls happening in parallel since both of them are asynchronous.
- When you call
prepareNextPage
it may happen that the firstfind
call will use the modifieddataQuery
object because it happens immediately after you call firstfind
- What I would recommend is to change the flow of the code where the second
find
is called only after you receive the result for the firstfind
(which based on your description should happen later on anyway, that is when the user reaches the end of the list in the UI)
1 Like