소스 검색

Internal: Adjusted engine's method use to its changes.

Piotrek Koszuliński 8 년 전
부모
커밋
5c96bbbf62
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/ckeditor5-image/src/imagecaption/imagecaptionengine.js

+ 1 - 1
packages/ckeditor5-image/src/imagecaption/imagecaptionengine.js

@@ -235,7 +235,7 @@ function insertViewCaptionAndBind( viewCaption, modelCaption, viewImage, mapper
  * @returns {module:engine/model/element~Element|null}
  */
 function getParentCaption( node ) {
-	const ancestors = node.getAncestors( { includeNode: true } );
+	const ancestors = node.getAncestors( { includeSelf: true } );
 	const caption = ancestors.find( ancestor => ancestor.name == 'caption' );
 
 	if ( caption && caption.parent && caption.parent.name == 'image' ) {