8
0
فهرست منبع

Add internal docs to MentionUI.

Maciej Gołaszewski 6 سال پیش
والد
کامیت
5b92bf09e7
1فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 4 5
      packages/ckeditor5-mention/src/mentionui.js

+ 4 - 5
packages/ckeditor5-mention/src/mentionui.js

@@ -364,11 +364,10 @@ export default class MentionUI extends Plugin {
 					} );
 				} )
 				.then( feed => {
-					if ( !feed ) {
-						return;
-					}
-
-					if ( !this.editor.model.markers.has( 'mention' ) ) {
+					// Do nothing if :
+					// - feed was discarded or empty feed was passed.
+					// - if the marker is not in the document - the selection might have already changed.
+					if ( !feed || !this.editor.model.markers.has( 'mention' ) ) {
 						return;
 					}