Skip to content

Commit acdd718

Browse files
committed
.
1 parent 6137c0f commit acdd718

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/util.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ export async function archiveConversation(browser: Browser, id: string) {
5555
if (await btn.isVisible()) await btn.click()
5656
}
5757

58-
// @ts-expect-error
59-
const title = (await page.evaluate(() => document.querySelector("h1 > strong").textContent, "")) ?? ""
58+
// In some shared conversations, title does not exists
59+
// page.evaluate: TypeError: Cannot read properties of null (reading 'textContent')
60+
const title = (await page.evaluate(() => document.querySelector("h1 > strong")?.textContent, "")) ?? ""
6061
const includesKatex = await page.evaluate(() => document.getElementsByClassName("katex").length > 0)
6162

6263
// Remove unnecessary elements from the page

0 commit comments

Comments
 (0)