Procházet zdrojové kódy

Fix: Fixed CC drop in `.sort` comparing function.

Szymon Cofalik před 7 roky
rodič
revize
10835f364d
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      packages/ckeditor5-engine/src/model/differ.js

+ 1 - 1
packages/ckeditor5-engine/src/model/differ.js

@@ -423,7 +423,7 @@ export default class Differ {
 			// If change happens at the same position...
 			if ( a.position.isEqual( b.position ) ) {
 				// Keep chronological order of operations.
-				return a.changeCount < b.changeCount ? -1 : 1;
+				return a.changeCount - b.changeCount;
 			}
 
 			// If positions differ, position "on the left" should be earlier in the result.