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