mirror of
https://github.com/codex-team/editor.js
synced 2024-06-09 09:22:16 +02:00
add try catch
This commit is contained in:
parent
5e8fe06dd6
commit
3c58c65733
|
@ -61,10 +61,12 @@ export default class Core {
|
|||
UI.checkEmptiness();
|
||||
ModificationsObserver.enable();
|
||||
|
||||
if ((this.configuration as EditorConfig).autofocus) {
|
||||
Caret.setToBlock(BlockManager.blocks[0], Caret.positions.START);
|
||||
BlockManager.highlightCurrentNode();
|
||||
}
|
||||
try {
|
||||
if ((this.configuration as EditorConfig).autofocus) {
|
||||
Caret.setToBlock(BlockManager.blocks[0], Caret.positions.START);
|
||||
BlockManager.highlightCurrentNode();
|
||||
}
|
||||
} catch {}
|
||||
|
||||
onReady();
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue