mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix: Iterate textChunks to find character data
This commit is contained in:
@@ -22,7 +22,9 @@ const parse = async (cardUrl, format) => {
|
|||||||
throw new Error('No PNG metadata.');
|
throw new Error('No PNG metadata.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return Buffer.from(textChunks[0].text, 'base64').toString('utf8');
|
let index = textChunks.findIndex((chunk) => chunk.keyword.toLowerCase() == 'chara');
|
||||||
|
|
||||||
|
return Buffer.from(textChunks[index].text, 'base64').toString('utf8');
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user