Skip to content

Commit 328bbb0

Browse files
author
linyisonger
committed
又一个bug...
1 parent 1f8825e commit 328bbb0

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

examples.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,3 @@
9999
099.数据对比.html
100100
100.曲面八分屏.html
101101
101.基金收益计算.html
102-
blog.html
103-
index.html

index.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,15 @@
270270
for (const nav of navData) {
271271
if (nav) {
272272
let navNum = nav.split(".").shift();
273-
let navName = nav.match(/[\d]{1,}.(.*?).html/)[1];
274-
let navSrc = "./" + nav?.replace("\r", "");
275-
navList.push({
276-
navNum,
277-
navName,
278-
navSrc,
279-
});
273+
let navName = nav.match(/[\d]{1,}.(.*?).html/)?.[1];
274+
if (navName) {
275+
let navSrc = "./" + nav?.replace("\r", "");
276+
navList.push({
277+
navNum,
278+
navName,
279+
navSrc,
280+
});
281+
}
280282
}
281283
}
282284
navList.sort((a, b) => b.navNum - a.navNum);

0 commit comments

Comments
 (0)