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

Fix: AttributeDelta created AttributeOperation with wrong oldValue value.

Szymon Cofalik 9 лет назад
Родитель
Сommit
08536f6c24
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      packages/ckeditor5-engine/src/treemodel/delta/attributedelta.js

+ 1 - 1
packages/ckeditor5-engine/src/treemodel/delta/attributedelta.js

@@ -204,7 +204,7 @@ function changeRange( doc, attributeKey, attributeValue, range ) {
 
 	function addOperation() {
 		let range = new Range( lastSplitPosition, position );
-		const operation = new AttributeOperation( range, attributeKey, attributeValueBefore, attributeValue, doc.version );
+		const operation = new AttributeOperation( range, attributeKey, attributeValueBefore || null, attributeValue, doc.version );
 
 		delta.addOperation( operation );
 		doc.applyOperation( operation );