mirror of https://github.com/vector-im/riot-web
Merge pull request #2922 from matrix-org/travis/merge-config
Add a function to append/overwrite objects in the config on the flypull/21833/head
commit
65020a56c1
|
@ -41,6 +41,12 @@ class SdkConfig {
|
||||||
static unset() {
|
static unset() {
|
||||||
global.mxReactSdkConfig = undefined;
|
global.mxReactSdkConfig = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static add(cfg) {
|
||||||
|
const liveConfig = SdkConfig.get();
|
||||||
|
const newConfig = Object.assign({}, liveConfig, cfg);
|
||||||
|
SdkConfig.put(newConfig);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = SdkConfig;
|
module.exports = SdkConfig;
|
||||||
|
|
Loading…
Reference in New Issue