8
0
Просмотр исходного кода

CloudServices context plugins should destroy token if token was created.

Maciej Gołaszewski 5 лет назад
Родитель
Сommit
c9e92a75b2
1 измененных файлов с 11 добавлено и 0 удалено
  1. 11 0
      packages/ckeditor5-cloud-services/src/cloudservices.js

+ 11 - 0
packages/ckeditor5-cloud-services/src/cloudservices.js

@@ -71,6 +71,17 @@ export default class CloudServices extends ContextPlugin {
 
 		return this.token.init();
 	}
+
+	/**
+	 * @inheritDoc
+	 */
+	destroy() {
+		super.destroy();
+
+		if ( this.token ) {
+			this.token.destroy();
+		}
+	}
 }
 
 CloudServices.Token = Token;