Skip to content

Commit

Permalink
fix(remote-config): incorrect if condition & doc update (#6892)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Feb 7, 2023
1 parent e1504aa commit 1a1488c
Showing 1 changed file with 3 additions and 3 deletions.
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

1 comment on commit 1a1488c

@vercel
Copy link

@vercel vercel bot commented on 1a1488c Feb 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.