Skip to content

Commit

Permalink
Corrected error msgs in chatgpt.menu.open()
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed May 11, 2024
1 parent 2e32119 commit cb559c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,8 @@ const chatgpt = { // eslint-disable-line no-redeclare
open: function() {
const menuBtn = document.querySelector('nav [id*="menu-button"][aria-expanded="false"]');
if (menuBtn)
try { menuBtn.click(); } catch (err) { console.error('Error while closing the menu'); throw new Error(err); }
else { console.error('Menu already hidden!'); throw new Error(); }
try { menuBtn.click(); } catch (err) { console.error('Error while opening the menu'); throw new Error(err); }
else { console.error('Menu already open!'); throw new Error(); }
}
},

Expand Down

0 comments on commit cb559c9

Please sign in to comment.