google_gemini_api: fixed a bug in checking empty apikey and model prefs
This commit is contained in:
parent
80fcf0e99a
commit
a9e55c71b5
1 changed files with 2 additions and 2 deletions
|
|
@ -417,11 +417,11 @@ async function openChatGPT(promptText, action, curr_tabId, prompt_name = '', do_
|
|||
if(mailMessage) mailMessageId5 = mailMessage.id;
|
||||
|
||||
// check if the config is present, or give a message error
|
||||
if (prefs.chatgpt_api_key == '') {
|
||||
if (prefs.google_gemini_api_key == '') {
|
||||
browser.tabs.sendMessage(createdTab.id, { command: "api_error", error: browser.i18n.getMessage('google_gemini_empty_apikey')});
|
||||
return;
|
||||
}
|
||||
if (prefs.chatgpt_model == '') {
|
||||
if (prefs.google_gemini_model == '') {
|
||||
browser.tabs.sendMessage(createdTab.id, { command: "api_error", error: browser.i18n.getMessage('google_gemini_empty_model')});
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue