8
0
Просмотр исходного кода

Update condition to check proper value.

Mateusz Samsel 6 лет назад
Родитель
Сommit
d28df95a6a
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/ckeditor5-font/src/ui/colorui.js

+ 2 - 2
packages/ckeditor5-font/src/ui/colorui.js

@@ -142,7 +142,7 @@ export default class ColorUI extends Plugin {
 					while ( !item.done ) {
 						if ( item.value.type === 'text' ) {
 							// Only text nodes can have color attributes.
-							const color = item.value.item.getAttribute( this.commandName );
+							const color = item.value.item.getAttribute( this.componentName );
 							if ( color ) {
 								this.addColorToRecentlyUsed( color );
 							}
@@ -151,7 +151,7 @@ export default class ColorUI extends Plugin {
 					}
 				} else if (
 					change.type === 'attribute' &&
-					change.attributeKey === this.commandName &&
+					change.attributeKey === this.componentName &&
 					change.attributeNewValue
 				) {
 					this.addColorToRecentlyUsed( change.attributeNewValue );