We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6137c0f commit acdd718Copy full SHA for acdd718
src/util.ts
@@ -55,8 +55,9 @@ export async function archiveConversation(browser: Browser, id: string) {
55
if (await btn.isVisible()) await btn.click()
56
}
57
58
- // @ts-expect-error
59
- const title = (await page.evaluate(() => document.querySelector("h1 > strong").textContent, "")) ?? ""
+ // In some shared conversations, title does not exists
+ // page.evaluate: TypeError: Cannot read properties of null (reading 'textContent')
60
+ const title = (await page.evaluate(() => document.querySelector("h1 > strong")?.textContent, "")) ?? ""
61
const includesKatex = await page.evaluate(() => document.getElementsByClassName("katex").length > 0)
62
63
// Remove unnecessary elements from the page
0 commit comments