Check file.type exists before using it

This commit is contained in:
Connor Yoh 2025-04-14 14:51:03 +01:00
parent b65a47ee97
commit 646c3efe54

View File

@ -170,7 +170,7 @@ function setupFileInput(chooser) {
inputContainer.querySelector('#fileInputText').innerHTML = window.fileInput.loading;
async function checkZipFile() {
const hasZipFiles = allFiles.some(file => zipTypes.includes(file.type));
const hasZipFiles = allFiles.some(file => file.type && zipTypes.includes(file.type));
// Only change to extractPDF message if we actually have zip files
if (hasZipFiles) {