Browse Source

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

Szymon Cofalik 9 years ago
parent
commit
fb5d6be0d0
1 changed files with 2 additions and 0 deletions
  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.