Skip to content

Commit c4cd842

Browse files
committed
Don't re-run OCR if no file provided, closes #6
1 parent 4c6c9ef commit c4cd842

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ocr.html

+4
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,10 @@ <h2>Pages</h2>
314314
const textareas = document.querySelectorAll('.image-container textarea');
315315
const images = document.querySelectorAll('.image-container img');
316316

317+
if (!textareas.length) {
318+
return;
319+
}
320+
317321
// Blank all the textareas
318322
Array.from(textareas).forEach(ta => ta.value = '');
319323
showFullDocument();

0 commit comments

Comments
 (0)