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

Changed early return order.

Piotr Jasiun пре 9 година
родитељ
комит
ecadd2e98b
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      packages/ckeditor5-engine/src/view/observer/selectionobserver.js

+ 2 - 2
packages/ckeditor5-engine/src/view/observer/selectionobserver.js

@@ -93,11 +93,11 @@ export default class SelectionObserver extends Observer {
 	 * @param {Document} domDocument DOM document.
 	 */
 	_handleSelectionChange( domDocument ) {
-		if ( !this.document.focusedEditable ) {
+		if ( !this.isEnabled ) {
 			return;
 		}
 
-		if ( !this.isEnabled ) {
+		if ( !this.document.focusedEditable ) {
 			return;
 		}