Răsfoiți Sursa

Code refactoring in ViewCollection class.

Aleksander Nowodzinski 8 ani în urmă
părinte
comite
b57aeccbef
1 a modificat fișierele cu 2 adăugiri și 5 ștergeri
  1. 2 5
      packages/ckeditor5-ui/src/viewcollection.js

+ 2 - 5
packages/ckeditor5-ui/src/viewcollection.js

@@ -135,11 +135,8 @@ export default class ViewCollection extends Collection {
 		if ( this.ready && !view.ready ) {
 			promise = promise
 				.then( () => view.init() )
-				.then( () => {
-					// The view is ready. There's no point in storing the promise
-					// any longer.
-					this._addPromises.delete( promise );
-				} );
+				// The view is ready. There's no point in storing the promise any longer.
+				.then( () => this._addPromises.delete( promise ) );
 
 			// Store the promise so it can be respected (and resolved) before #destroy()
 			// starts destroying the child view.