fix: failed tests

This commit is contained in:
Xiaohan-Tian
2026-05-15 12:30:12 -07:00
parent ac2d924711
commit f5a1ef5b94
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -123,13 +123,14 @@ export class OpfsModelCache {
const finalWritable = await finalHandle.createWritable();
try {
const tempFile = await tempHandle.getFile();
const tempBuffer = await tempFile.arrayBuffer();
console.log('[opfsModelCache] Temp file ready for finalize copy.', {
filename,
tempFilename,
tempSize: tempFile.size,
expectedSize: sizeValue,
});
await finalWritable.write(tempFile);
await finalWritable.write(tempBuffer);
await finalWritable.close();
} catch (error) {
await finalWritable.abort();