Skip to content

Commit 665f243

Browse files
committed
[*] remove unnecessary code
- fix #1 and #10 * squash into path strip simplification later
1 parent 2f28040 commit 665f243

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

harextract.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
// doing a single second pass to slice + join.
178178
if (harents.length > 0) {
179179
for (var ncommon = 0, allsame = true; allsame && ncommon < harents[0].pathcomps.length; ++ ncommon) {
180-
allsame = true;
181180
let refpart = harents[0].pathcomps[ncommon];
182181
for (ent of harents) {
183182
if (ent.pathcomps[ncommon] != refpart) {
@@ -187,7 +186,7 @@
187186
}
188187
}
189188
for (ent of harents) {
190-
ent.path = (ncommon < 0 ? '' : ent.pathcomps.slice(ncommon - 1).join('/'));
189+
ent.path = ent.pathcomps.slice(ncommon - 1).join('/');
191190
}
192191
}
193192

0 commit comments

Comments
 (0)