mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix gallery for first in the list
This commit is contained in:
@@ -169,7 +169,7 @@ async function showCharGallery() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
let url = selected_group || this_chid;
|
let url = selected_group || this_chid;
|
||||||
if (!selected_group && this_chid) {
|
if (!selected_group && this_chid !== undefined) {
|
||||||
const char = characters[this_chid];
|
const char = characters[this_chid];
|
||||||
url = char.avatar.replace('.png', '');
|
url = char.avatar.replace('.png', '');
|
||||||
}
|
}
|
||||||
@@ -455,7 +455,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
|
|||||||
async function listGalleryCommand(args) {
|
async function listGalleryCommand(args) {
|
||||||
try {
|
try {
|
||||||
let url = args.char ?? (args.group ? groups.find(it => it.name == args.group)?.id : null) ?? (selected_group || this_chid);
|
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];
|
const char = characters[this_chid];
|
||||||
url = char.avatar.replace('.png', '');
|
url = char.avatar.replace('.png', '');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user