Преглед изворни кода

Fix: AttributeDelta created AttributeOperation with wrong oldValue value.

Szymon Cofalik пре 9 година
родитељ
комит
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 );