Skip to content

Commit e5ede41

Browse files
author
Shubham Bhardwaj
authored
made clearFirestoreData throw error at invalid data
make clearFirestoreData throw error when projectId is not specfied.
1 parent a6bd3fe commit e5ede41

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/providers/firestore.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ export type ClearFirestoreDataOptions = {
236236
*/
237237
export function clearFirestoreData(options: ClearFirestoreDataOptions) {
238238
return new Promise((resolve, reject) => {
239+
if (!options.projectId) {
240+
throw new Error('projectId not specified');
241+
}
239242
const config = {
240243
method: 'DELETE',
241244
hostname: 'localhost',

0 commit comments

Comments
 (0)