mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-23 15:37:50 +01:00
fix: Iterate textChunks to find character data
This commit is contained in:
parent
e3ccaf70a1
commit
84a21fba27
@ -22,7 +22,9 @@ const parse = async (cardUrl, format) => {
|
||||
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:
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user