fix: resetThread should never throw

remotes/origin/feature/api-redesign
Travis Fischer 2022-12-16 17:07:27 -06:00
rodzic bddad8b73f
commit 94d54836a7
1 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -445,10 +445,11 @@ export class ChatGPTAPIBrowser {
}
async resetThread() {
const resetButton = await this._page.$('nav > a:nth-child(1)')
if (!resetButton) throw new Error('not signed in')
await resetButton.click()
try {
await this._page.click('nav > a:nth-child(1)')
} catch (err) {
// ignore for now
}
}
async close() {