Commit 94d54836 authored by Travis Fischer's avatar Travis Fischer

fix: resetThread should never throw

parent bddad8b7
...@@ -445,10 +445,11 @@ export class ChatGPTAPIBrowser { ...@@ -445,10 +445,11 @@ export class ChatGPTAPIBrowser {
} }
async resetThread() { async resetThread() {
const resetButton = await this._page.$('nav > a:nth-child(1)') try {
if (!resetButton) throw new Error('not signed in') await this._page.click('nav > a:nth-child(1)')
} catch (err) {
await resetButton.click() // ignore for now
}
} }
async close() { async close() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment