Skip to content

Commit

Permalink
Update firestore.ts
Browse files Browse the repository at this point in the history
Use FIRESTORE_HOST in clearFirestoreData (firebase#193)
  • Loading branch information
shackijj authored Feb 25, 2023
1 parent 8775696 commit fc1b6b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/firestore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ const FIRESTORE_ADDRESS = FIRESTORE_ADDRESS_ENVS.reduce(
'localhost:8080'
);
const FIRESTORE_PORT = FIRESTORE_ADDRESS.split(':')[1];
const FIRESTORE_HOST = FIRESTORE_ADDRESS.split(':')[0];

/** Clears all data in firestore. Works only in offline mode.
*/
Expand All @@ -272,7 +273,7 @@ export function clearFirestoreData(options: { projectId: string } | string) {

const config = {
method: 'DELETE',
hostname: 'localhost',
hostname: FIRESTORE_HOST,
port: FIRESTORE_PORT,
path: `/emulator/v1/projects/${projectId}/databases/(default)/documents`,
};
Expand Down

0 comments on commit fc1b6b6

Please sign in to comment.