提交 8f2523c4 编写于 作者: B Benjamin Pasero

fix potential npe in editor.hide()

上级 5059f47e
......@@ -519,8 +519,12 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
// Clear Position
this.clearPosition(position);
// Take editor container offdom and hide
editor.getContainer().offDOM().hide();
// Take editor container offdom and hide. Check if the editor container
// exists in case someone manages to hide an editor before it was created
const editorContainer = editor.getContainer();
if (editorContainer) {
editorContainer.offDOM().hide();
}
// Adjust layout and rochade if instructed to do so
if (layoutAndRochade) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册