Explorar o código

Other: Remove redundant check from getOffset in Position.

Maciej Gołaszewski %!s(int64=8) %!d(string=hai) anos
pai
achega
d2624012ad
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/ckeditor5-engine/src/model/position.js

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

@@ -832,7 +832,7 @@ export default class Position {
 // @private
 // @param {Array.<Number>} path Position path. See {@link module:engine/model/position~Position#path}.
 function getOffset( path ) {
-	return last( path ) || 0;
+	return last( path );
 }
 
 // Helper for setting offset on give path array.