Bläddra i källkod

Removed unnecessary complication - if it ever becomes a problem we should throw, not hide the error.

Piotrek Koszuliński 10 år sedan
förälder
incheckning
6b7f82a51e

+ 1 - 4
packages/ckeditor5-engine/src/editor.js

@@ -75,13 +75,10 @@ CKEDITOR.define( [
 			var that = this;
 			var config = this.config;
 
-			// Create and cache a promise that resolves when all initialization procedures get resolved.
-			this._initPromise = this._initPromise || Promise.all( [
+			return Promise.all( [
 				loadPlugins().then( initPlugins )
 			] );
 
-			return this._initPromise;
-
 			function loadPlugins() {
 				return that.plugins.load( config.plugins );
 			}

+ 0 - 6
packages/ckeditor5-engine/tests/editor/editor.js

@@ -92,12 +92,6 @@ describe( 'init', function() {
 		return promise;
 	} );
 
-	it( 'should return the same promise for successive calls', function() {
-		var promise = editor.init();
-
-		expect( editor.init() ).to.equal( promise );
-	} );
-
 	it( 'should fill `plugins`', function() {
 		var Editor = modules.editor;
 		var Plugin = modules.plugin;