Explorar o código

Simplified intialization.

Maciej Bukowski %!s(int64=8) %!d(string=hai) anos
pai
achega
df2e775638
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  1. 6 4
      packages/ckeditor5-cloud-services/src/cloudservices.js

+ 6 - 4
packages/ckeditor5-cloud-services/src/cloudservices.js

@@ -42,13 +42,15 @@ export default class CloudServices extends Plugin {
 		 * @member {Object|null} #token
 		 */
 
-		if ( this.tokenUrl ) {
-			this.token = new CloudServices.Token( this.tokenUrl );
+		if ( !this.tokenUrl ) {
+			this.token = null;
 
-			return this.token.init();
+			return;
 		}
 
-		this.token = null;
+		this.token = new CloudServices.Token( this.tokenUrl );
+
+		return this.token.init();
 	}
 }