Skip to content

Commit 5ca4991

Browse files
committed
Fix sorted map.
1 parent 086a754 commit 5ca4991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/firestore/src/util/sorted_map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export class SortedMapIterator<K, V> {
197197
while (!node.isEmpty()) {
198198
cmp = startKey ? comparator(node.key, startKey) : 1;
199199
// flip the comparison if we're going in reverse
200-
if (isReverse) {
200+
if (startKey && isReverse) {
201201
cmp *= -1;
202202
}
203203

0 commit comments

Comments
 (0)