From a7e8d00145dfecd63fb055c7990c7bea443e32f5 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 14 Dec 2024 15:16:43 +0200 Subject: [PATCH] Use Array.includes --- public/scripts/instruct-mode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/scripts/instruct-mode.js b/public/scripts/instruct-mode.js index 6875bb228..73660ad65 100644 --- a/public/scripts/instruct-mode.js +++ b/public/scripts/instruct-mode.js @@ -432,7 +432,7 @@ export function formatInstructModeExamples(mesExamplesArray, name1, name2) { } const includeNames = power_user.instruct.names_behavior === names_behavior_types.ALWAYS; - const includeGroupNames = selected_group && (includeNames || power_user.instruct.names_behavior === names_behavior_types.FORCE); + const includeGroupNames = selected_group && [names_behavior_types.ALWAYS, names_behavior_types.FORCE].includes(power_user.instruct.names_behavior); let inputPrefix = power_user.instruct.input_sequence || ''; let outputPrefix = power_user.instruct.output_sequence || '';