8
0
Prechádzať zdrojové kódy

CloudServices context plugins should destroy token if token was created.

Maciej Gołaszewski 5 rokov pred
rodič
commit
c9e92a75b2

+ 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;