mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Tag import fixed, again. (accepts char avatar key)
This commit is contained in:
parent
02d6df3ace
commit
29a1f777dc
@ -445,7 +445,11 @@ export function getTagKeyForEntity(entityOrKey) {
|
||||
}
|
||||
|
||||
// Next lets check if its a valid character or character id, so we can swith it to its tag
|
||||
const character = characters.indexOf(x) >= 0 ? x : characters[x];
|
||||
let character;
|
||||
if (!character && characters.indexOf(x) >= 0) character = x; // Check for char object
|
||||
if (!character && typeof x === 'number') character = characters[x]; // check if its a char id
|
||||
if (!character) character = characters.find(y => y.avatar === x); // check if its a char key
|
||||
|
||||
if (character) {
|
||||
x = character.avatar;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user