Browse Source

Simplified intialization.

Maciej Bukowski 8 years ago
parent
commit
df2e775638
1 changed files with 6 additions and 4 deletions
  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();
 	}
 }