Explorar el Código

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

Szymon Cofalik hace 7 años
padre
commit
10835f364d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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.