Skip to content

Commit

Permalink
Use post-processed config in static methods
Browse files Browse the repository at this point in the history
  • Loading branch information
sammacbeth committed Dec 30, 2024
1 parent c40ee95 commit ca22c1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion shared/js/background/components/remote-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export default class RemoteConfig {
* @param {Config} configValue
*/
updateConfig(configValue) {
this.config = processRawConfig(configValue, this.settings)
// copy config value before modification
const configCopy = structuredClone(configValue)
this.config = processRawConfig(configCopy, this.settings)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion shared/js/background/storage/tds.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default {
_tds: { entities: {}, trackers: {}, domains: {}, cnames: {} },
_surrogates: '',
get config() {
return globalThis.components?.tds.config.data || this._config;
return globalThis.components?.config.config || this._config;
},
get tds() {
return globalThis.components?.tds.tds.data || this._tds;
Expand Down

0 comments on commit ca22c1c

Please sign in to comment.