Skip to content

Commit 69a93ae

Browse files
authored
firestore.database should not be required (#8680)
1 parent 132d8e7 commit 69a93ae

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Fixed an issue where 'firestore.database' was accidentally treated as a required field. (#8678)

src/deploy/firestore/deploy.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ async function createDatabase(context: any, options: Options): Promise<void> {
1919
if (!options.projectId) {
2020
throw new FirebaseError("Project ID is required to create a Firestore database.");
2121
}
22-
if (!firestoreCfg || !firestoreCfg.database) {
23-
throw new FirebaseError("Firestore database configuration is missing in firebase.json.");
22+
if (!firestoreCfg) {
23+
throw new FirebaseError("Firestore database configuration not found in firebase.json.");
24+
}
25+
if (!firestoreCfg.database) {
26+
firestoreCfg.database = "(default)";
2427
}
2528
const api = new FirestoreApi();
2629
try {

0 commit comments

Comments
 (0)