mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-13 10:30:14 +01:00
Fix gallery for first in the list
This commit is contained in:
parent
16b62d9fb3
commit
50e49cd67b
@ -169,7 +169,7 @@ async function showCharGallery() {
|
||||
|
||||
try {
|
||||
let url = selected_group || this_chid;
|
||||
if (!selected_group && this_chid) {
|
||||
if (!selected_group && this_chid !== undefined) {
|
||||
const char = characters[this_chid];
|
||||
url = char.avatar.replace('.png', '');
|
||||
}
|
||||
@ -455,7 +455,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
|
||||
async function listGalleryCommand(args) {
|
||||
try {
|
||||
let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid);
|
||||
if (!args.char && !args.group && !selected_group && this_chid) {
|
||||
if (!args.char && !args.group && !selected_group && this_chid !== undefined) {
|
||||
const char = characters[this_chid];
|
||||
url = char.avatar.replace('.png', '');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user