From 03d531ba777b51bad75dba746c02c091f902b93f Mon Sep 17 00:00:00 2001 From: Ian Storm Taylor Date: Fri, 9 Nov 2018 16:39:11 -0800 Subject: [PATCH] fix path transformation bug when moving exactly --- packages/slate/src/utils/path-utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/slate/src/utils/path-utils.js b/packages/slate/src/utils/path-utils.js index 08ac4cef2..ec70253ef 100644 --- a/packages/slate/src/utils/path-utils.js +++ b/packages/slate/src/utils/path-utils.js @@ -352,10 +352,10 @@ function transform(path, operation) { if (pAbove) { path = np.concat(path.slice(p.size)) + } else if (pEqual) { + path = np } else { - if (pEqual) { - path = np - } else if (pYounger) { + if (pYounger) { path = decrement(path, 1, pIndex) }