Przeglądaj źródła

Other: Small refactor tweak.

Szymon Cofalik 7 lat temu
rodzic
commit
423cce04e0
1 zmienionych plików z 1 dodań i 5 usunięć
  1. 1 5
      packages/ckeditor5-engine/src/model/position.js

+ 1 - 5
packages/ckeditor5-engine/src/model/position.js

@@ -238,11 +238,7 @@ export default class Position {
 				return 'after';
 
 			default:
-				if ( this.path[ result ] < otherPosition.path[ result ] ) {
-					return 'before';
-				} else {
-					return 'after';
-				}
+				return this.path[ result ] < otherPosition.path[ result ] ? 'before' : 'after';
 		}
 	}