add try catch

This commit is contained in:
SamiOP75 2023-12-18 17:50:14 +01:00
parent 5e8fe06dd6
commit 3c58c65733

View file

@ -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();
})