Skip to content

Commit 4e8a5f6

Browse files
authored
fix(reference): update function name in error message
Currently, the error message for the invalid first argument in the `doc()` function says "expected first argument to collection()"... instead of "to doc()". This seems to be a copy-paste of the validation logic from `collection()`. This commit corrects the name.
1 parent a029ce3 commit 4e8a5f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/firestore/src/lite-api/reference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ export function doc<AppModelType, DbModelType extends DocumentData>(
651651
) {
652652
throw new FirestoreError(
653653
Code.INVALID_ARGUMENT,
654-
'Expected first argument to collection() to be a CollectionReference, ' +
654+
'Expected first argument to doc() to be a CollectionReference, ' +
655655
'a DocumentReference or FirebaseFirestore'
656656
);
657657
}

0 commit comments

Comments
 (0)