diff --git a/network-poc/static/index.html b/network-poc/static/index.html index d242c40..71ca410 100644 --- a/network-poc/static/index.html +++ b/network-poc/static/index.html @@ -2271,6 +2271,10 @@ IMPORTANT: Include get_db() dependency for FastAPI` }, const card = document.getElementById(cardId); if (!card) return; const files = projectFiles[cardId]; + if (!files || Object.keys(files).length === 0) { + alert('Tiedostot eivät ole enää muistissa — aja pipeline uudelleen.'); + return; + } // CRC-32 laskenta ZIP-tiedostoille function crc32(bytes) { @@ -2291,7 +2295,7 @@ IMPORTANT: Include get_db() dependency for FastAPI` }, for (const [name, content] of entries) { const nameBytes = new TextEncoder().encode(name); - const contentBytes = new TextEncoder().encode(content); + const contentBytes = new TextEncoder().encode(content || ''); const crc = crc32(contentBytes); // Local file header