Browse Source

Made ListView synchronous.

Aleksander Nowodzinski 8 years ago
parent
commit
29ec43fe73

+ 1 - 1
packages/ckeditor5-ui/src/list/listview.js

@@ -98,7 +98,7 @@ export default class ListView extends View {
 		// Start listening for the keystrokes coming from #element.
 		// Start listening for the keystrokes coming from #element.
 		this.keystrokes.listenTo( this.element );
 		this.keystrokes.listenTo( this.element );
 
 
-		return super.init();
+		super.init();
 	}
 	}
 
 
 	/**
 	/**

+ 3 - 4
packages/ckeditor5-ui/tests/list/listview.js

@@ -64,10 +64,9 @@ describe( 'ListView', () => {
 
 
 			const spy = sinon.spy( view.keystrokes, 'listenTo' );
 			const spy = sinon.spy( view.keystrokes, 'listenTo' );
 
 
-			return view.init().then( () => {
-				sinon.assert.calledOnce( spy );
-				sinon.assert.calledWithExactly( spy, view.element );
-			} );
+			view.init();
+			sinon.assert.calledOnce( spy );
+			sinon.assert.calledWithExactly( spy, view.element );
 		} );
 		} );
 
 
 		describe( 'activates keyboard navigation for the list', () => {
 		describe( 'activates keyboard navigation for the list', () => {