fix: resetThread should never throw

chatgpt-api-old-v3
Travis Fischer 2022-12-16 17:07:27 -06:00
rodzic 758cbcd27a
commit bb6084a079
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() {