Merge pull request #2923 from SillyTavern/fix-piping-split-unnamed-args Fix piping not actually using/inputting an array for empty unnamed args
Signed| @@ -508,6 +508,14 @@ export class SlashCommandClosure { | |||
| 508 | return v; | 508 | return v; |
| 509 | }); | 509 | }); |
| 510 | } | 510 | } |
| 511 | |||
| 512 | value ??= ''; | ||
| 513 | |||
| 514 | // Make sure that if unnamed args are split, it should always return an array | ||
| 515 | if (executor.command.splitUnnamedArgument && !Array.isArray(value)) { | ||
| 516 | value = [value]; | ||
| 517 | } | ||
| 518 | |||
| 511 | return value; | 519 | return value; |
| 512 | } | 520 | } |
| 513 | 521 | ||