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

Fixes incorrect use of Object.assign when backfilling SSRC config with defaults. #2503

Merged
merged 9 commits into from
Mar 21, 2024

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.

Base automatically changed from ssrc-prefix to ssrc March 21, 2024 20:22
@erikeldridge erikeldridge merged commit 7246526 into ssrc Mar 21, 2024
5 checks passed
@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.

None yet

3 participants