Skip to content

Commit

Permalink
[*] remove unnecessary code
Browse files Browse the repository at this point in the history
- fix #1 and #10
* squash into path strip simplification later
  • Loading branch information
JC3 committed Apr 4, 2022
1 parent 2f28040 commit 665f243
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions harextract.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@
// doing a single second pass to slice + join.
if (harents.length > 0) {
for (var ncommon = 0, allsame = true; allsame && ncommon < harents[0].pathcomps.length; ++ ncommon) {
allsame = true;
let refpart = harents[0].pathcomps[ncommon];
for (ent of harents) {
if (ent.pathcomps[ncommon] != refpart) {
Expand All @@ -187,7 +186,7 @@
}
}
for (ent of harents) {
ent.path = (ncommon < 0 ? '' : ent.pathcomps.slice(ncommon - 1).join('/'));
ent.path = ent.pathcomps.slice(ncommon - 1).join('/');
}
}

Expand Down

0 comments on commit 665f243

Please sign in to comment.