Skip to content

Commit

Permalink
Merge master into release
Browse files Browse the repository at this point in the history
  • Loading branch information
google-oss-bot authored Jun 6, 2023
2 parents 8dd911f + fe7da7e commit beab2d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/giant-bees-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/firestore": patch
---

Fix potentially false warning message.
9 changes: 5 additions & 4 deletions packages/firestore/src/lite-api/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,18 @@ export function connectFirestoreEmulator(
): void {
firestore = cast(firestore, Firestore);
const settings = firestore._getSettings();
const newHostSetting = `${host}:${port}`;

if (settings.host !== DEFAULT_HOST && settings.host !== host) {
if (settings.host !== DEFAULT_HOST && settings.host !== newHostSetting) {
logWarn(
'Host has been set in both settings() and useEmulator(), emulator host ' +
'will be used'
'Host has been set in both settings() and connectFirestoreEmulator(), emulator host ' +
'will be used.'
);
}

firestore._setSettings({
...settings,
host: `${host}:${port}`,
host: newHostSetting,
ssl: false
});

Expand Down

0 comments on commit beab2d9

Please sign in to comment.