mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
show dep message only once
This commit is contained in:
@@ -73,12 +73,6 @@ class Slot extends React.Component {
|
||||
const { plugins } = this.context;
|
||||
let children = this.getChildren();
|
||||
|
||||
if (!!get(reduxState, 'config.plugin_config')) {
|
||||
console.warn(
|
||||
`deprecation warning: config.plugin_config will be phased out soon, please replace calls from config.plugin_config to config.plugins_config`
|
||||
);
|
||||
}
|
||||
|
||||
const pluginsConfig =
|
||||
get(reduxState, 'config.plugins_config') ||
|
||||
get(reduxState, 'config.plugin_config') ||
|
||||
|
||||
@@ -83,11 +83,17 @@ class PluginsService {
|
||||
* getSlotComponentProps calculate the props we would pass to the slot component.
|
||||
* query datas are only passed to the component if it is defined in `component.fragments`.
|
||||
*/
|
||||
showPluginsConfigWarning = true;
|
||||
|
||||
getSlotComponentProps(component, reduxState, props, queryData) {
|
||||
if (!!get(reduxState, 'config.plugin_config')) {
|
||||
if (
|
||||
!!get(reduxState, 'config.plugin_config') &&
|
||||
this.showPluginsConfigWarning
|
||||
) {
|
||||
console.warn(
|
||||
`deprecation warning: config.plugin_config will be phased out soon, please replace calls from config.plugin_config to config.plugins_config`
|
||||
);
|
||||
this.showPluginsConfigWarning = false;
|
||||
}
|
||||
|
||||
const pluginsConfig =
|
||||
|
||||
Reference in New Issue
Block a user