浏览代码

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 );