Skip to content

Commit

Permalink
apply sebastian big brain
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Chen committed Mar 3, 2021
1 parent 47f882d commit 45aba16
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/firestore/src/api/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -840,10 +840,10 @@ export class DocumentReference<T = PublicDocumentData>
return new DocumentReference<U>(
this.firestore,
converter
? this._delegate.withConverter<U>(
? this._delegate.withConverter(
FirestoreDataConverter.getInstance(this.firestore, converter)
)
: this._delegate.withConverter(null)
: (this._delegate.withConverter(null) as ExpDocumentReference<U>)
);
}
}
Expand Down Expand Up @@ -1151,14 +1151,14 @@ export class Query<T = PublicDocumentData>
withConverter<U>(converter: PublicFirestoreDataConverter<U>): Query<U>;
withConverter<U>(
converter: PublicFirestoreDataConverter<U> | null
): Query<U> | Query<DocumentData> {
return new Query(
): Query<U> {
return new Query<U>(
this.firestore,
converter
? this._delegate.withConverter(
FirestoreDataConverter.getInstance(this.firestore, converter)
)
: this._delegate.withConverter(null)
: (this._delegate.withConverter(null) as ExpQuery<U>)
);
}
}
Expand Down Expand Up @@ -1301,14 +1301,14 @@ export class CollectionReference<T = PublicDocumentData>
): CollectionReference<U>;
withConverter<U>(
converter: PublicFirestoreDataConverter<U> | null
): CollectionReference<U> | CollectionReference<PublicDocumentData> {
return new CollectionReference(
): CollectionReference<U> {
return new CollectionReference<U>(
this.firestore,
converter
? this._delegate.withConverter(
FirestoreDataConverter.getInstance(this.firestore, converter)
)
: this._delegate.withConverter(null)
: (this._delegate.withConverter(null) as ExpCollectionReference<U>)
);
}
}
Expand Down

0 comments on commit 45aba16

Please sign in to comment.