Skip to content

Commit b61721b

Browse files
author
Ives van Hoorne
committed
Put emmet execution in try catch statement
1 parent 6e5aff6 commit b61721b

File tree

1 file changed

+6
-1
lines changed
  • src/app/components/sandbox/CodeEditor

1 file changed

+6
-1
lines changed

src/app/components/sandbox/CodeEditor/index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,12 @@ export default class CodeEditor extends React.PureComponent {
249249
} else {
250250
const spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
251251
cm.replaceSelection(spaces, 'end', '+input');
252-
cm.execCommand('emmetExpandAbbreviation');
252+
253+
try {
254+
cm.execCommand('emmetExpandAbbreviation');
255+
} catch (e) {
256+
console.error(e);
257+
}
253258
}
254259
},
255260
Enter: 'emmetInsertLineBreak',

0 commit comments

Comments
 (0)