8
0
Aleksander Nowodzinski 5 лет назад
Родитель
Сommit
e374a14071

+ 0 - 16
packages/ckeditor5-link/src/linkimageui.js

@@ -40,20 +40,6 @@ export default class LinkImageUI extends Plugin {
 		return 'LinkImageUI';
 	}
 
-	/**
-	 * @inheritDoc
-	 */
-	constructor( editor ) {
-		super( editor );
-
-		/**
-		 * The plugin button view.
-		 *
-		 * @member {module:ui/button/buttonview~Button}
-		 */
-		this.linkButtonView = null;
-	}
-
 	/**
 	 * @inheritDoc
 	 */
@@ -114,8 +100,6 @@ export default class LinkImageUI extends Plugin {
 				}
 			} );
 
-			this.linkButtonView = button;
-
 			return button;
 		} );
 	}

+ 3 - 4
packages/ckeditor5-link/tests/linkimageui.js

@@ -17,7 +17,7 @@ import LinkImageUI from '../src/linkimageui';
 
 describe( 'LinkImageUI', () => {
 	let editor, viewDocument, editorElement;
-	let plugin, linkButtonComponent, linkButton;
+	let plugin, linkButton;
 
 	testUtils.createSinonSandbox();
 
@@ -32,10 +32,9 @@ describe( 'LinkImageUI', () => {
 			.then( newEditor => {
 				editor = newEditor;
 				viewDocument = editor.editing.view.document;
-				linkButtonComponent = editor.ui.componentFactory.create( 'linkImage' );
+				linkButton = editor.ui.componentFactory.create( 'linkImage' );
 
 				plugin = editor.plugins.get( 'LinkImageUI' );
-				linkButton = plugin.linkButtonView;
 			} );
 	} );
 
@@ -63,7 +62,7 @@ describe( 'LinkImageUI', () => {
 
 	describe( 'link toolbar UI component', () => {
 		it( 'should be registered', () => {
-			expect( linkButtonComponent ).to.be.instanceOf( ButtonView );
+			expect( linkButton ).to.be.instanceOf( ButtonView );
 		} );
 
 		describe( 'link button', () => {