fix(widget-code): change dynamic import to require (#3745)

This commit is contained in:
Erez Rokah 2020-05-12 20:24:28 +03:00 committed by GitHub
parent 3e34e52440
commit 3d7d5d2e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -169,7 +169,7 @@ export default class CodeControl extends React.Component {
if (changedProps.lang) {
const { mode } = this.getLanguageByName(changedProps.lang) || {};
if (mode) {
await import(`codemirror/mode/${mode}/${mode}.js`);
require(`codemirror/mode/${mode}/${mode}.js`);
}
}