8
0
Quellcode durchsuchen

Simplify canBeCodeBlock() schema check return value.

Maciej Gołaszewski vor 6 Jahren
Ursprung
Commit
3fcbc0a6b6
1 geänderte Dateien mit 1 neuen und 5 gelöschten Zeilen
  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' );
 }