From 5cb4dbc280bd3d92e77d4a46fe7280c4ec1b8079 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Mon, 15 Jan 2024 20:45:21 +0200 Subject: [PATCH] Trim TG types after split --- public/scripts/textgen-settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/textgen-settings.js b/public/scripts/textgen-settings.js index 7b20d9256..51b08538d 100644 --- a/public/scripts/textgen-settings.js +++ b/public/scripts/textgen-settings.js @@ -595,7 +595,7 @@ jQuery(function () { function showTypeSpecificControls(type) { $('[data-tg-type]').each(function () { - const tgTypes = $(this).attr('data-tg-type').split(','); + const tgTypes = $(this).attr('data-tg-type').split(',').map(x => x.trim()); for (const tgType of tgTypes) { if (tgType === type || tgType == 'all') { $(this).show();