浏览代码

Improve editor destructuring process.

Maciej Gołaszewski 6 年之前
父节点
当前提交
540e891b8e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/ckeditor5-editor-balloon/src/ballooneditor.js

+ 2 - 0
packages/ckeditor5-editor-balloon/src/ballooneditor.js

@@ -102,11 +102,13 @@ export default class BalloonEditor extends Editor {
 		const data = this.getData();
 		const data = this.getData();
 
 
 		this.ui.destroy();
 		this.ui.destroy();
+		this.ui = null;
 
 
 		return super.destroy()
 		return super.destroy()
 			.then( () => {
 			.then( () => {
 				if ( this.sourceElement ) {
 				if ( this.sourceElement ) {
 					setDataInElement( this.sourceElement, data );
 					setDataInElement( this.sourceElement, data );
+					this.sourceElement = null;
 				}
 				}
 			} );
 			} );
 	}
 	}