Explorar o código

Sixth batch of changes aligning schema use to the new API.

Piotrek Koszuliński %!s(int64=8) %!d(string=hai) anos
pai
achega
69a1f6debc
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      packages/ckeditor5-list/tests/listcommand.js

+ 2 - 2
packages/ckeditor5-list/tests/listcommand.js

@@ -34,9 +34,9 @@ describe( 'ListCommand', () => {
 		model.schema.register( 'widget', { inheritAllFrom: '$block' } );
 
 		model.schema.on( 'checkChild', ( evt, args ) => {
-			const rule = model.schema.getRule( args[ 1 ] );
+			const def = model.schema.getDefinition( args[ 1 ] );
 
-			if ( args[ 0 ].matchEnd( 'widget' ) && rule.name == 'listItem' ) {
+			if ( args[ 0 ].endsWith( 'widget' ) && def.name == 'listItem' ) {
 				evt.stop();
 				evt.return = false;
 			}