fix(client): sporadious crash with classic toolbar not being available

pull/1250/head
Elian Doran 2025-02-22 09:37:20 +07:00
parent fcc1068b06
commit 530340f753
No known key found for this signature in database
1 changed files with 3 additions and 1 deletions

@ -223,7 +223,9 @@ export default class EditableTextTypeWidget extends AbstractTextTypeWidget {
}
$classicToolbarWidget.empty();
$classicToolbarWidget[0].appendChild(editor.ui.view.toolbar.element);
if ($classicToolbarWidget.length) {
$classicToolbarWidget[0].appendChild(editor.ui.view.toolbar.element);
}
if (utils.isMobile()) {
$classicToolbarWidget.addClass("visible");