mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-13 10:30:14 +01:00
Forbid custom expressions to be prefixed with defaults
This commit is contained in:
parent
3574527780
commit
94f53835f4
@ -1552,7 +1552,7 @@ async function onClickExpressionAddCustom() {
|
||||
toastr.warning('Invalid custom expression name provided', 'Add Custom Expression');
|
||||
return;
|
||||
}
|
||||
if (DEFAULT_EXPRESSIONS.includes(expressionName)) {
|
||||
if (DEFAULT_EXPRESSIONS.includes(expressionName) || DEFAULT_EXPRESSIONS.some(x => expressionName.startsWith(x))) {
|
||||
toastr.warning('Expression name already exists', 'Add Custom Expression');
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user