瀏覽代碼

Simplified intialization.

Maciej Bukowski 8 年之前
父節點
當前提交
df2e775638
共有 1 個文件被更改,包括 6 次插入4 次删除
  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();
 	}
 }