Skip to content

Commit a02c9ce

Browse files
author
Brian Chen
authored
Revert "Add warning when developer overrides host without specifying merge (#4925)"
This reverts commit 2a6ad8c.
1 parent 2a6ad8c commit a02c9ce

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

packages/firestore/src/api/database.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ import {
117117
validateIsNotUsedTogether,
118118
validateSetOptions
119119
} from '../util/input_validation';
120-
import { logWarn, setLogLevel as setClientLogLevel } from '../util/log';
120+
import { setLogLevel as setClientLogLevel } from '../util/log';
121121

122122
import { Blob } from './blob';
123123
import {
@@ -216,26 +216,14 @@ export class Firestore
216216
}
217217

218218
settings(settingsLiteral: PublicSettings): void {
219-
const currentSettings = this._delegate._getSettings();
220-
if (
221-
!settingsLiteral.merge &&
222-
currentSettings.host !== settingsLiteral.host
223-
) {
224-
logWarn(
225-
'You are overriding the original host. If you did not intend ' +
226-
'to override your settings, use {merge: true}.'
227-
);
228-
}
229-
230219
if (settingsLiteral.merge) {
231220
settingsLiteral = {
232-
...currentSettings,
221+
...this._delegate._getSettings(),
233222
...settingsLiteral
234223
};
235224
// Remove the property from the settings once the merge is completed
236225
delete settingsLiteral.merge;
237226
}
238-
239227
this._delegate._setSettings(settingsLiteral);
240228
}
241229

0 commit comments

Comments
 (0)