Browse Source

Get rid of nth helper.

Oskar Wróbel 8 years ago
parent
commit
3b3f457f62
1 changed files with 2 additions and 3 deletions
  1. 2 3
      packages/ckeditor5-ui/src/contextualballoon.js

+ 2 - 3
packages/ckeditor5-ui/src/contextualballoon.js

@@ -10,7 +10,6 @@
 import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import BalloonPanelView from './panel/balloon/balloonpanelview';
 import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
-import nth from '@ckeditor/ckeditor5-utils/src/nth';
 
 /**
  * Provides the common contextual balloon panel for the editor.
@@ -163,7 +162,7 @@ export default class ContextualBalloon extends Plugin {
 	 */
 	updatePosition( position ) {
 		if ( position ) {
-			nth( 0, this._stack )[ 1 ].position = position;
+			this._stack.values().next().value.position = position;
 		}
 
 		this.view.attachTo( this._getBalloonPosition() );
@@ -198,7 +197,7 @@ export default class ContextualBalloon extends Plugin {
 	 * @returns {module:utils/dom/position~Options}
 	 */
 	_getBalloonPosition() {
-		return nth( 0, this._stack )[ 1 ].position;
+		return this._stack.values().next().value.position;
 	}
 
 	/**