diff --git a/web/site-pdf.js b/web/site-pdf.js index 042bf62..49ace99 100644 --- a/web/site-pdf.js +++ b/web/site-pdf.js @@ -406,6 +406,7 @@ function detalhesDaFolha(a,i,aberto){ linhas.map(l=>''+l+'').join('')+''; } function pintaFolha(){ + if(!MODOS[modo]) return; // read after the customer left the product page invalidaItemAtual(); const L=larguraFilme(); pintaTipoEnvio(); // trava o seletor enquanto houver folha @@ -529,6 +530,9 @@ function pintaProgressoArte(a){ barra.style.width=a.lendo+'%'; if(texto) texto.textContent='arquivo grande · gerando a prévia · '+faltaLeitura(a.leitura); } function pintaArtes(){ + // A file still being read when the customer left the product page lands + // here with no product open: nothing to paint. + if(!MODOS[modo]) return; invalidaItemAtual(); $('zona').classList.toggle('compacta', artes.length>0); // The same card as a finished sheet: thumbnail, size, a DPI chip, then the