瀏覽代碼

Fixed: engine.treeModel.Schema incorrectly interpreted empty arrays in query attribute property.

Szymon Cofalik 9 年之前
父節點
當前提交
fb5d6be0d0
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/ckeditor5-engine/src/treemodel/schema.js

+ 2 - 0
packages/ckeditor5-engine/src/treemodel/schema.js

@@ -365,6 +365,8 @@ export default class Schema {
 		// If attributes property is a string or undefined, wrap it in an array for easier processing.
 		if ( !isArray( query.attributes ) ) {
 			query.attributes = [ query.attributes ];
+		} else if ( query.attributes.length === 0 ) {
+			query.attributes.push( undefined );
 		}
 
 		// Normalize the path to an array of strings.