Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(remote-config): incorrect if condition statement & inline documentation update #6892

Merged
merged 1 commit into from
Feb 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/remote-config/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class FirebaseConfigModule extends FirebaseModule {
throw new Error("firebase.remoteConfig().defaultConfig: 'defaults' must be an object.");
}
// To make Firebase web v9 API compatible, we update the config first so it immediately
// updates defaults on the instance. We then pass to web platform to update. We do this because
// updates defaults on the instance. We then pass to underlying SDK to update. We do this because
// there is no way to "await" a setter.
this._updateFromConstants(defaults);
this.setDefaults.call(this, defaults, true);
Expand All @@ -113,7 +113,7 @@ class FirebaseConfigModule extends FirebaseModule {

set settings(settings) {
// To make Firebase web v9 API compatible, we update the settings first so it immediately
// updates settings on the instance. We then pass to web platform to update. We do this because
// updates settings on the instance. We then pass to underlying SDK to update. We do this because
// there is no way to "await" a setter. We can't delegate to `setConfigSettings()` as it is setup
// for native.
this._updateFromConstants(settings);
Expand Down Expand Up @@ -176,7 +176,7 @@ class FirebaseConfigModule extends FirebaseModule {

setConfigSettings(settings) {
const updatedSettings = {};
if (!this._isWeb) {
if (this._isWeb) {
updatedSettings.fetchTimeMillis = this._settings.fetchTimeMillis;
updatedSettings.minimumFetchIntervalMillis = this._settings.minimumFetchIntervalMillis;
} else {
Expand Down