Bläddra i källkod

Simplify canBeCodeBlock() schema check return value.

Maciej Gołaszewski 6 år sedan
förälder
incheckning
3fcbc0a6b6
1 ändrade filer med 1 tillägg och 5 borttagningar
  1. 1 5
      packages/ckeditor5-code-block/src/codeblockcommand.js

+ 1 - 5
packages/ckeditor5-code-block/src/codeblockcommand.js

@@ -156,9 +156,5 @@ function canBeCodeBlock( schema, element ) {
 		return false;
 	}
 
-	if ( !schema.checkChild( element.parent, 'codeBlock' ) ) {
-		return false;
-	}
-
-	return true;
+	return schema.checkChild( element.parent, 'codeBlock' );
 }