Merge pull request #3317 from NodudeWasTaken/fix-empty-examples

Fix mes examples being undefined if empty
This commit is contained in:
Cohee
2025-01-18 23:31:32 +02:00
committed by GitHub

View File

@ -3902,7 +3902,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
* @returns {string[]} Examples array with block heading
*/
function parseMesExamples(examplesStr) {
if (examplesStr.length === 0 || examplesStr === '<START>') {
if (!examplesStr || examplesStr.length === 0 || examplesStr === '<START>') {
return [];
}