diff --git a/app/config.js b/app/config.js index 5dd62d24..bb4ee888 100644 --- a/app/config.js +++ b/app/config.js @@ -20,17 +20,20 @@ export default class Config extends React.Component { componentDidMount () { ipcRenderer.on('config change', this.onChange); + ipcRenderer.on('plugins change', this.onChange); } // passes `config` as props to the decorated component render () { const child = React.Children.only(this.props.children); const { config } = this.state; - return React.cloneElement(child, { config }); + const decorate = remote.require('./plugins').decorateConfig; + return React.cloneElement(child, { config: decorate(config) }); } componentWillUnmount () { ipcRenderer.removeListener('config change', this.onChange); + ipcRenderer.removeListener('plugins change', this.onChange); } }