8
0
Просмотр исходного кода

Cleaning code after last refactor.

Kuba Niegowski 5 лет назад
Родитель
Сommit
69e9b6d610
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      packages/ckeditor5-widget/src/widgettypearound/widgettypearound.js

+ 4 - 4
packages/ckeditor5-widget/src/widgettypearound/widgettypearound.js

@@ -648,13 +648,13 @@ export default class WidgetTypeAround extends Plugin {
 		const documentSelection = model.document.selection;
 		const documentSelection = model.document.selection;
 
 
 		this.listenTo( editor.model, 'insertContent', ( evt, [ content, selectable ] ) => {
 		this.listenTo( editor.model, 'insertContent', ( evt, [ content, selectable ] ) => {
-			const typeAroundSelectionAttributeValue = documentSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE );
-
-			if ( !typeAroundSelectionAttributeValue ) {
+			if ( selectable && !selectable.is( 'documentSelection' ) ) {
 				return;
 				return;
 			}
 			}
 
 
-			if ( selectable && !selectable.is( 'documentSelection' ) ) {
+			const typeAroundSelectionAttributeValue = documentSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE );
+
+			if ( !typeAroundSelectionAttributeValue ) {
 				return;
 				return;
 			}
 			}