From 04568741859e78c01b10246d0e122d58a7f8486b Mon Sep 17 00:00:00 2001 From: mic Date: Fri, 3 May 2024 23:05:38 +0200 Subject: [PATCH] exiting for loop when the model is found. related to #38 --- js/mzta-chatgpt.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/mzta-chatgpt.js b/js/mzta-chatgpt.js index a05d7838..ecee2635 100644 --- a/js/mzta-chatgpt.js +++ b/js/mzta-chatgpt.js @@ -220,6 +220,7 @@ function checkGPT4Model() { document.getElementById('mzta-model_warn').style.display = 'none'; document.getElementById('mzta-btn_gpt35').style.display = 'none'; resolve("GPT4"); + break; } else if (!element) { console.log("Element not found!"); clearInterval(intervalId);