diff --git a/chatgpt.js b/chatgpt.js index 8047c8b12..7d8905bd6 100644 --- a/chatgpt.js +++ b/chatgpt.js @@ -905,11 +905,10 @@ const chatgpt = { // eslint-disable-line no-redeclare history: { isLoaded: function() { return new Promise(resolve => { - const checkChatHistory = () => { + (function checkChatHistory() { if (document.querySelector('nav')) resolve(true); else setTimeout(checkChatHistory, 100); - }; - checkChatHistory(); + })(); });} },