mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix for no arg
This commit is contained in:
@ -154,7 +154,7 @@ export class SlashCommandAutoCompleteNameResult extends AutoCompleteNameResult {
|
|||||||
if (idx > -1) {
|
if (idx > -1) {
|
||||||
argAssign = this.executor.unnamedArgumentList[idx];
|
argAssign = this.executor.unnamedArgumentList[idx];
|
||||||
cmdArg = this.executor.command.unnamedArgumentList[idx];
|
cmdArg = this.executor.command.unnamedArgumentList[idx];
|
||||||
if (cmdArg === undefined && this.executor.command.unnamedArgumentList.slice(-1)[0].acceptsMultiple) {
|
if (cmdArg === undefined && this.executor.command.unnamedArgumentList.slice(-1)[0]?.acceptsMultiple) {
|
||||||
cmdArg = this.executor.command.unnamedArgumentList.slice(-1)[0];
|
cmdArg = this.executor.command.unnamedArgumentList.slice(-1)[0];
|
||||||
}
|
}
|
||||||
const enumList = cmdArg?.enumProvider?.(this.executor, this.scope) ?? cmdArg?.enumList;
|
const enumList = cmdArg?.enumProvider?.(this.executor, this.scope) ?? cmdArg?.enumList;
|
||||||
@ -168,7 +168,7 @@ export class SlashCommandAutoCompleteNameResult extends AutoCompleteNameResult {
|
|||||||
value = '';
|
value = '';
|
||||||
start = index;
|
start = index;
|
||||||
cmdArg = notProvidedArguments[0];
|
cmdArg = notProvidedArguments[0];
|
||||||
if (cmdArg === undefined && this.executor.command.unnamedArgumentList.slice(-1)[0].acceptsMultiple) {
|
if (cmdArg === undefined && this.executor.command.unnamedArgumentList.slice(-1)[0]?.acceptsMultiple) {
|
||||||
cmdArg = this.executor.command.unnamedArgumentList.slice(-1)[0];
|
cmdArg = this.executor.command.unnamedArgumentList.slice(-1)[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user