Patch Changes
-
Fixed infinite loop in
BTreeIndex.takeInternalwhen indexed values areundefined. (#1198)The BTree uses
undefinedas a special parameter meaning "start from beginning/end", which caused an infinite loop when the actual indexed value wasundefined.Added
takeFromStartandtakeReversedFromEndmethods to explicitly start from the beginning/end, and introduced a sentinel value for storingundefinedin the BTree. -
Fix
isReadytracking for on-demand live queries without orderBy. Previously, non-ordered live queries usingsyncMode: 'on-demand'were incorrectly marked as ready before data finished loading. Also fixpreload()promises hanging when cleanup occurs before the collection becomes ready. Additionally, fix concurrent live queries subscribing to the same source collection - each now independently tracks loading state. (#1192)