Fix bug when only global bans are defined

c37c9051a62abc18d7f873dd010ac0ab4981e492

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +3 -3Showing whitespace changes
public/scripts/textgen-settings.js+3 -3
@@ -399,7 +399,7 @@ function getTokenizerForTokenIds() {
399399 * @returns {TokenBanResult} String with comma-separated banned token IDs
400400 */
401401function getCustomTokenBans() {
402402 if (!settings.send_banned_tokens || (!settings.banned_tokens && !settings.global_banned_tokens && !textgenerationwebui_banned_in_macros.length)) {
403403 return {
404404 banned_tokens: '',
405405 banned_strings: [],
@@ -460,7 +460,7 @@ function getCustomTokenBans() {
460460
461461async function enableBannedStringsKillSwitch() {
462462 $('#send_banned_tokens_textgenerationwebui').prop('checked', true);
463463 $('#send_banned_tokens_label').find('.menu_button').addClass('toggleEnabled').prop('title', t`Banned tokens/strings are being sent intoin the request.`);
464464 settings.send_banned_tokens = true;
465465 saveSettingsDebounced();
466466 return '';
@@ -468,7 +468,7 @@ async function enableBannedStringsKillSwitch() {
468468
469469async function disableBannedStringsKillSwitch() {
470470 $('#send_banned_tokens_textgenerationwebui').prop('checked', false);
471471 $('#send_banned_tokens_label').find('.menu_button').removeClass('toggleEnabled').prop('title', t`Banned tokens/strings are NOT being sent intoin the request.`);
472472 settings.send_banned_tokens = false;
473473 saveSettingsDebounced();
474474 return '';