Skip to content

Conversation

@erikeldridge
Copy link
Contributor

In the logic where we backfill config with defaults, the first argument to Object.assign should be an object to assign to, but the code passed the object containing the defaults. It should be:

const mergedConfig = Object.assign({}, this.defaultConfig, evaluatedConfig);

Not:

const mergedConfig = Object.assign(this.defaultConfig, evaluatedConfig);

The effect of the bug was to overwrite the defaults with the remote values, which is why in-app default would initially work, and updating to a remote value would work, but then switching back to in-app default wouldn't change the value from the previous remote value.

Discussion

Working with @lahirumaramba and @amanda-xia.

Testing

Ran npm test and all tests pass.

Functionally tested using a local server.

@erikeldridge erikeldridge self-assigned this Mar 21, 2024
@erikeldridge erikeldridge requested a review from amanda-xia March 21, 2024 18:54
Base automatically changed from ssrc-prefix to ssrc March 21, 2024 20:22
@erikeldridge erikeldridge merged commit 7246526 into ssrc Mar 21, 2024
@erikeldridge erikeldridge deleted the ssrc-fix-object-assign branch March 21, 2024 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants