浏览代码

Fix "def" shorthand.

panr 5 年之前
父节点
当前提交
3a873d4207
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      packages/ckeditor5-image/src/imageresize/ui/imageresizeui.js

+ 6 - 6
packages/ckeditor5-image/src/imageresize/ui/imageresizeui.js

@@ -167,14 +167,14 @@ export default class ImageResizeUI extends Plugin {
 function prepareListDefinitions( definitions, command, resizeUnit ) {
 	const itemDefinitions = new Collection();
 
-	definitions.map( definition => {
-		const parsedValue = definition.value ? definition.value + resizeUnit : null;
-		const def = {
+	definitions.map( itemDefinition => {
+		const parsedValue = itemDefinition.value ? itemDefinition.value + resizeUnit : null;
+		const definition = {
 			type: 'button',
 			model: new Model( {
 				commandName: 'imageResize',
 				commandValue: parsedValue,
-				label: definition.label,
+				label: itemDefinition.label,
 				withText: true,
 				icon: null
 			} )
@@ -182,9 +182,9 @@ function prepareListDefinitions( definitions, command, resizeUnit ) {
 
 		const commandCallback = setOptionOn( parsedValue );
 
-		def.model.bind( 'isOn' ).to( command, 'value', commandCallback );
+		definition.model.bind( 'isOn' ).to( command, 'value', commandCallback );
 
-		itemDefinitions.add( def );
+		itemDefinitions.add( definition );
 	} );
 
 	return itemDefinitions;