[firestore] Fix incorrect references
This commit is contained in:
parent
1f5231cfba
commit
5aa8435aff
|
@ -101,7 +101,7 @@ export default class Firestore extends FirestoreInternalModule {
|
||||||
* @returns {CollectionReference}
|
* @returns {CollectionReference}
|
||||||
*/
|
*/
|
||||||
collection(collectionPath: string): CollectionReference {
|
collection(collectionPath: string): CollectionReference {
|
||||||
const path = super._referencePath.child(collectionPath);
|
const path = this._referencePath.child(collectionPath);
|
||||||
if (!path.isCollection) {
|
if (!path.isCollection) {
|
||||||
throw new Error('Argument "collectionPath" must point to a collection.');
|
throw new Error('Argument "collectionPath" must point to a collection.');
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ export default class Firestore extends FirestoreInternalModule {
|
||||||
* @returns {DocumentReference}
|
* @returns {DocumentReference}
|
||||||
*/
|
*/
|
||||||
doc(documentPath: string): DocumentReference {
|
doc(documentPath: string): DocumentReference {
|
||||||
const path = super._referencePath.child(documentPath);
|
const path = this._referencePath.child(documentPath);
|
||||||
if (!path.isDocument) {
|
if (!path.isDocument) {
|
||||||
throw new Error('Argument "documentPath" must point to a document.');
|
throw new Error('Argument "documentPath" must point to a document.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue