Parcourir la source

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

Piotrek Koszuliński il y a 8 ans
Parent
commit
fcc2a26f08
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      packages/ckeditor5-typing/tests/deletecommand.js

+ 2 - 2
packages/ckeditor5-typing/tests/deletecommand.js

@@ -245,9 +245,9 @@ describe( 'DeleteCommand', () => {
 
 		it( 'does not replace an element if a paragraph is not allowed in current position', () => {
 			model.schema.on( 'checkChild', ( evt, args ) => {
-				const rule = model.schema.getRule( args[ 1 ] );
+				const def = model.schema.getDefinition( args[ 1 ] );
 
-				if ( args[ 0 ].matchEnd( '$root' ) && rule.name == 'paragraph' ) {
+				if ( args[ 0 ].endsWith( '$root' ) && def.name == 'paragraph' ) {
 					evt.stop();
 					evt.return = false;
 				}