Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit 133f4da

Browse files
fix: Remove incorrect,unreachable and unused code (#1983)
* Prevent Serialization of firestore The toJSON function spelling name is incorrect therefore this method is not triggered when using JSON.stringify on firestore objects * Remove unused code This code is never invoked, the spelling of toJSON is also wrong ( it is toJson here) Also the Firestore Class toJSON method works well now for protecting the private keys of firestore instance --------- Co-authored-by: Mila <[email protected]>
1 parent ecfb8fe commit 133f4da

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

dev/src/index.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -745,13 +745,6 @@ export class Firestore implements firestore.Firestore {
745745
}
746746

747747
this._settings = settings;
748-
this._settings.toJson = function () {
749-
const temp = Object.assign({}, this);
750-
if (temp.credentials) {
751-
temp.credentials = {private_key: '***', client_email: '***'};
752-
}
753-
return temp;
754-
};
755748
this._serializer = new Serializer(this);
756749
}
757750

0 commit comments

Comments
 (0)