mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Editing a script can bypass the unique naming system by just renaming the script to another one. This change ensures that no two script names can be the same by checking if the existing index and found indices differ. If something goes wrong, it would be better to use a filter and a map and then check the index array length/includes. FindIndex is used here for efficiency's sake since each array index is unique. Signed-off-by: kingbri <bdashore3@proton.me>