diff --git a/components/Carbon.js b/components/Carbon.js index 5509a5f..2ab22e0 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -33,6 +33,16 @@ class Carbon extends React.PureComponent { onChange: () => {} } + componentDidUpdate(prevProps) { + // TODO keep opacities in state + if ( + prevProps.config.theme != this.props.config.theme || + prevProps.config.language != this.props.config.language + ) { + this.prevLine = null + } + } + handleLanguageChange = debounce( (newCode, language) => { if (language === 'auto') {