修复类型检查:补充DOM类型库并消除feed-detail严格模式告警
This commit is contained in:
@@ -297,7 +297,9 @@ export async function getSubComments(
|
|||||||
const parentIndex = await page.evaluate((cid: string) => {
|
const parentIndex = await page.evaluate((cid: string) => {
|
||||||
const parents = document.querySelectorAll('.parent-comment');
|
const parents = document.querySelectorAll('.parent-comment');
|
||||||
for (let i = 0; i < parents.length; i++) {
|
for (let i = 0; i < parents.length; i++) {
|
||||||
const item = parents[i].querySelector('.comment-item');
|
const parent = parents.item(i);
|
||||||
|
if (!parent) continue;
|
||||||
|
const item = parent.querySelector('.comment-item');
|
||||||
if (!item) continue;
|
if (!item) continue;
|
||||||
const id =
|
const id =
|
||||||
item.getAttribute('id')?.replace(/^comment-/, '') ??
|
item.getAttribute('id')?.replace(/^comment-/, '') ??
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "ESNext",
|
"module": "ESNext",
|
||||||
"moduleResolution": "bundler",
|
"moduleResolution": "bundler",
|
||||||
"lib": ["ES2022"],
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user