8
0
panr 5 лет назад
Родитель
Сommit
2218987f75

+ 1 - 18
packages/ckeditor5-image/src/imageupload/utils.js

@@ -7,11 +7,10 @@
  * @module image/imageupload/utils
  */
 
-/* global fetch, File, console */
+/* global fetch, File */
 
 import LabeledFieldView from '@ckeditor/ckeditor5-ui/src/labeledfield/labeledfieldview';
 import { createLabeledInputText } from '@ckeditor/ckeditor5-ui/src/labeledfield/utils';
-import { attachLinkToDocumentation } from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
 
 /**
  * Creates a regular expression used to test for image files.
@@ -127,22 +126,6 @@ export function prepareIntegrations( editor ) {
 			object[ key ] = PREDEFINED_INTEGRATIONS[ key ];
 		} else if ( editor.ui.componentFactory.has( key ) ) {
 			object[ key ] = editor.ui.componentFactory.create( key );
-		} else {
-			/**
-			 * The specified name of the view cannot be created by the
-			 * {@link module:ui/componentfactory~ComponentFactory component factory}.
-			 *
-			 * Check whether:
-			 * * you passed the proper integration name as the
-			 *    `{@link module:image/imageupload~ImageUploadPanelConfig#items image.upload.panel.items}`,
-			 * * the plugin that registers the component was loaded to the editor,
-			 * * integration component was properly registered by the plugin.
-			 *
-			 * @error image-upload-integrations-invalid-view
-			 */
-			console.warn( attachLinkToDocumentation(
-				'image-upload-integrations-invalid-view: Trying to use a view that does not exist.'
-			), { key } );
 		}
 
 		return object;

+ 1 - 6
packages/ckeditor5-image/tests/imageupload/utils.js

@@ -3,7 +3,7 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-/* globals document, console */
+/* globals document */
 
 import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
 
@@ -84,8 +84,6 @@ describe( 'Upload utils', () => {
 			const editorElement = document.createElement( 'div' );
 			document.body.appendChild( editorElement );
 
-			const consoleWarn = sinon.stub( console, 'warn' );
-
 			const editor = await ClassicEditor
 				.create( editorElement, {
 					plugins: [
@@ -108,9 +106,6 @@ describe( 'Upload utils', () => {
 
 			expect( Object.values( prepareIntegrations( editor ) ).length ).to.equal( 1 );
 
-			sinon.assert.calledOnce( consoleWarn );
-			expect( /image-upload-integrations-invalid-view/gmi.test( consoleWarn.args[ 0 ][ 0 ] ) ).to.be.true;
-
 			editor.destroy();
 			editorElement.remove();
 		} );