mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
Deprecation stuff
This commit is contained in:
+6
-3
@@ -69,9 +69,12 @@ function initExternalConfig({ store, pym, inIframe }) {
|
||||
pym.onMessage('config', rawConfig => {
|
||||
const config = JSON.parse(rawConfig);
|
||||
if (config.plugin_config) {
|
||||
console.warn(
|
||||
'Deprecation Warning: `config.plugin_config` will be phased out soon, please replace `config.plugin_config with `config.plugins_config`'
|
||||
);
|
||||
// @Deprecated
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
console.warn(
|
||||
'Deprecation Warning: `config.plugin_config` will be phased out soon, please replace `config.plugin_config with `config.plugins_config`'
|
||||
);
|
||||
}
|
||||
config.plugins_config = config.plugin_config;
|
||||
delete config.plugin_config;
|
||||
}
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
// @Deprecated plugin_config
|
||||
export const pluginsConfigSelector = state =>
|
||||
state.config.plugins_config || state.config.plugin_config;
|
||||
export const pluginsConfigSelector = state => state.config.plugins_config;
|
||||
|
||||
Reference in New Issue
Block a user