ソースを参照

Prevent of destroying undefined wordcoutn container.

Mateusz Samsel 6 年 前
コミット
f32cfdf8f5
1 ファイル変更4 行追加2 行削除
  1. 4 2
      packages/ckeditor5-word-count/src/wordcount.js

+ 4 - 2
packages/ckeditor5-word-count/src/wordcount.js

@@ -136,8 +136,10 @@ export default class WordCount extends Plugin {
 	 * @inheritDoc
 	 */
 	destroy() {
-		this._outputView.element.remove();
-		this._outputView.destroy();
+		if ( this._outputView ) {
+			this._outputView.element.remove();
+			this._outputView.destroy();
+		}
 
 		super.destroy();
 	}