소스 검색

Simplify canBeCodeBlock() schema check return value.

Maciej Gołaszewski 6 년 전
부모
커밋
3fcbc0a6b6
1개의 변경된 파일1개의 추가작업 그리고 5개의 파일을 삭제
  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' );
 }