瀏覽代碼

Small fixes.

panr 5 年之前
父節點
當前提交
774a2445f5

+ 1 - 1
packages/ckeditor5-image/src/imageupload/ui/imageuploadformrowview.js

@@ -27,7 +27,7 @@ export default class ImageUploadFormRowView extends View {
 	 *
 	 * @param {module:utils/locale~Locale} locale The locale instance.
 	 * @param {Object} options
-	 * @param {Array.<module:ui/view~View>} options.children
+	 * @param {Array.<module:ui/view~View>} [options.children]
 	 * @param {String} [options.class]
 	 * @param {module:ui/view~View} [options.labelView] When passed, the row gets the `group` and `aria-labelledby`
 	 * DOM attributes and gets described by the label.

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

@@ -94,7 +94,6 @@ function getImageMimeType( blob, src ) {
  *
  * @returns {Object.<String, module:ui/view~View>} Integrations object.
  */
-
 export function prepareIntegrations( editor ) {
 	const panelItems = editor.config.get( 'image.upload.panel.items' );
 	const imageUploadUIPlugin = editor.plugins.get( 'ImageUploadUI' );
@@ -122,7 +121,7 @@ export function prepareIntegrations( editor ) {
 	}
 
 	// Creates integrations object of valid views to pass it to the ImageUploadPanelView.
-	const integrations = panelItems.reduce( ( object, key ) => {
+	return panelItems.reduce( ( object, key ) => {
 		if ( PREDEFINED_INTEGRATIONS[ key ] ) {
 			object[ key ] = PREDEFINED_INTEGRATIONS[ key ];
 		} else if ( editor.ui.componentFactory.has( key ) ) {
@@ -140,8 +139,6 @@ export function prepareIntegrations( editor ) {
 
 		return object;
 	}, {} );
-
-	return integrations;
 }
 
 /**