fix build

This commit is contained in:
undefined committed 2025-09-12 05:08:48 +08:00
1 parent a7622cee59
commit 99f73b492b
7 files changed
+8 -6

No files matched your search

+2 -1
View File
@@ -385,7 +385,8 @@ export async function run({
} catch (e) {
throw new ValidationError('zip', null, e.message);
}
data.code = await entries.find((i) => i.filename.endsWith('answer.code'))?.getData(new Zip.TextWriter()) || '';
const codeEntry = entries.find((i) => i.filename.endsWith('answer.code') && i.directory === false);
data.code = await (codeEntry as any)?.getData(new Zip.TextWriter()) || '';
} catch { /* ignore no code */ }
const result = JSON.parse(Buffer.from(rdoc.result, 'base64').toString('utf8'));
if (result.error) {