File tree 3 files changed +10
-1
lines changed
3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
+ - [ fixed] Fixed a performance regression introduced by the addition of
3
+ ` Query.limitToLast(n: number) ` in Firestore 1.7.0 (Firebase 7.3.0) (#2620 ).
2
4
- [ fixed] Fixed an issue where ` CollectionReference.add() ` would reject
3
5
custom types when using ` withConverter() ` . (#2606 )
4
6
Original file line number Diff line number Diff line change @@ -135,6 +135,13 @@ export class SortedSet<T> {
135
135
136
136
unionWith ( other : SortedSet < T > ) : SortedSet < T > {
137
137
let result : SortedSet < T > = this ;
138
+
139
+ // Make sure `result` always refers to the larger one of the two sets.
140
+ if ( result . size < other . size ) {
141
+ result = other ;
142
+ other = this ;
143
+ }
144
+
138
145
other . forEach ( elem => {
139
146
result = result . add ( elem ) ;
140
147
} ) ;
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ function initializeApp(
134
134
( {
135
135
getToken : async ( ) => ( { accessToken : accessToken } ) ,
136
136
getUid : ( ) => null ,
137
- addAuthTokenListener : ( listener ) => {
137
+ addAuthTokenListener : listener => {
138
138
// Call listener once immediately with predefined accessToken.
139
139
listener ( accessToken ) ;
140
140
} ,
You can’t perform that action at this time.
0 commit comments