mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08:00
Add a function to append/overwrite objects in the config on the fly
Intended to be used to overwrite settings which may be calculated rather than provided.
This commit is contained in:
parent
f6154bc7cd
commit
a11cf88e07
@ -41,6 +41,12 @@ class SdkConfig {
|
||||
static unset() {
|
||||
global.mxReactSdkConfig = undefined;
|
||||
}
|
||||
|
||||
static add(cfg) {
|
||||
const liveConfig = SdkConfig.get();
|
||||
const newConfig = Object.assign({}, liveConfig, cfg);
|
||||
SdkConfig.put(newConfig);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = SdkConfig;
|
||||
|
Loading…
Reference in New Issue
Block a user