瀏覽代碼

Fixed: when checking path, Schema should skip items which are not registered.

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

+ 5 - 0
packages/ckeditor5-engine/src/model/schema.js

@@ -178,6 +178,11 @@ export class SchemaItem {
 
 			// Now we have to check every item name from the path to check.
 			for ( let checkName of checkPath ) {
+				// Don't check items that are not registered in schema.
+				if ( !this._schema.hasItem( checkName ) ) {
+					continue;
+				}
+
 				// Every item name is expanded to all names of items that item is extending.
 				// So, if on item path, there is an item that is extended by item from checked path, it will
 				// also be treated as matching.