mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
More clear message for character import failure
This commit is contained in:
@ -61,6 +61,11 @@ const parse = async (cardUrl, format) => {
|
||||
return PNGtext.decode(chunk.data);
|
||||
});
|
||||
|
||||
if (textChunks.length === 0) {
|
||||
console.error('PNG metadata does not contain any character data.');
|
||||
throw new Error('No PNG metadata.');
|
||||
}
|
||||
|
||||
return Buffer.from(textChunks[0].text, 'base64').toString('utf8');
|
||||
default:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user