Skip to content

Commit 930be11

Browse files
Udpate comment
1 parent 25b97f7 commit 930be11

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/firestore/src/api/database.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ export class DocumentReference<T = PublicDocumentData>
830830
try {
831831
return setDoc(this._delegate, value, options);
832832
} catch (e) {
833-
throw rewriteError(e, 'setDoc', 'DocumentReference.set');
833+
throw replaceFunctionName(e, 'setDoc', 'DocumentReference.set');
834834
}
835835
}
836836

@@ -857,7 +857,7 @@ export class DocumentReference<T = PublicDocumentData>
857857
);
858858
}
859859
} catch (e) {
860-
throw rewriteError(e, 'updateDoc', 'DocumentReference.update');
860+
throw replaceFunctionName(e, 'updateDoc', 'DocumentReference.update');
861861
}
862862
}
863863

@@ -938,7 +938,7 @@ export class DocumentReference<T = PublicDocumentData>
938938
* Replaces the function name in an error thrown by the firestore-exp API
939939
* with the function names used in the classic API.
940940
*/
941-
function rewriteError(
941+
function replaceFunctionName(
942942
e: Error,
943943
originalFunctionName: string,
944944
updatedFunctionName: string
@@ -968,7 +968,8 @@ export function extractSnapshotOptions(
968968

969969
/**
970970
* Creates an observer that can be passed to the firestore-exp SDK. The
971-
* observer converts all observed values into the format expected by the shim.
971+
* observer converts all observed values into the format expected by the classic
972+
* SDK.
972973
*
973974
* @param args The list of arguments from an `onSnapshot` call.
974975
* @param wrapper The function that converts the firestore-exp type into the

0 commit comments

Comments
 (0)