Skip to content
Permalink
Browse files

path: move branch to the correct location

This code branch only makes sense when i === length. Otherwise it'll
already be handled.

PR-URL: #28556
Fixes: #28549
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
  • Loading branch information...
BridgeAR authored and ZYSzys committed Jul 5, 2019
1 parent 5a6aa66 commit e12f48ef07e837553ea9c537b08d3e4a44d3fad2
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/path.js
@@ -518,11 +518,11 @@ const win32 = {
lastCommonSep = 3;
}
}
if (lastCommonSep === -1)
lastCommonSep = 0;
}

let out = '';
if (lastCommonSep === -1)
lastCommonSep = 0;
// Generate the relative path based on the path difference between `to` and
// `from`
for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {

0 comments on commit e12f48e

Please sign in to comment.
You can’t perform that action at this time.