Преглед изворни кода

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' ) {