@@ -109,8 +109,8 @@ export class DocumentReference<T = firestore.DocumentData>
109
109
get parent ( ) : CollectionReference < T > {
110
110
return new CollectionReference < T > (
111
111
this . firestore ,
112
- this . _key . path . popLast ( ) ,
113
- this . _converter
112
+ this . _converter ,
113
+ this . _key . path . popLast ( )
114
114
) ;
115
115
}
116
116
@@ -122,8 +122,8 @@ export class DocumentReference<T = firestore.DocumentData>
122
122
validateCollectionPath ( absolutePath ) ;
123
123
return new CollectionReference (
124
124
this . firestore ,
125
- absolutePath ,
126
- /* converter= */ null
125
+ /* converter= */ null ,
126
+ absolutePath
127
127
) ;
128
128
}
129
129
@@ -389,8 +389,8 @@ export class CollectionReference<T = firestore.DocumentData>
389
389
390
390
constructor (
391
391
readonly firestore : Firestore ,
392
- readonly _path : ResourcePath ,
393
- converter : firestore . FirestoreDataConverter < T > | null
392
+ converter : firestore . FirestoreDataConverter < T > | null ,
393
+ readonly _path : ResourcePath
394
394
) {
395
395
super ( firestore , converter , newQueryForPath ( _path ) ) ;
396
396
}
@@ -431,7 +431,7 @@ export class CollectionReference<T = firestore.DocumentData>
431
431
withConverter < U > (
432
432
converter : firestore . FirestoreDataConverter < U >
433
433
) : firestore . CollectionReference < U > {
434
- return new CollectionReference < U > ( this . firestore , this . _path , converter ) ;
434
+ return new CollectionReference < U > ( this . firestore , converter , this . _path ) ;
435
435
}
436
436
}
437
437
@@ -458,7 +458,7 @@ export function collection(
458
458
if ( parent instanceof Firestore ) {
459
459
const absolutePath = ResourcePath . fromString ( relativePath ) ;
460
460
validateCollectionPath ( absolutePath ) ;
461
- return new CollectionReference ( parent , absolutePath , /* converter= */ null ) ;
461
+ return new CollectionReference ( parent , /* converter= */ null , absolutePath ) ;
462
462
} else {
463
463
if (
464
464
! ( parent instanceof DocumentReference ) &&
@@ -476,8 +476,8 @@ export function collection(
476
476
validateCollectionPath ( absolutePath ) ;
477
477
return new CollectionReference (
478
478
parent . firestore ,
479
- absolutePath ,
480
- /* converter= */ null
479
+ /* converter= */ null ,
480
+ absolutePath
481
481
) ;
482
482
}
483
483
}
0 commit comments