diff --git a/scrape/parse.js b/scrape/parse.js index b7d6e5f..026ebf3 100644 --- a/scrape/parse.js +++ b/scrape/parse.js @@ -92,14 +92,14 @@ export default async function parseThisShit(downloadedFilePath) { try { const regex = /^úklid\s+(?:\d+\s+)?[A-Za-z]{2}$/ const cellText = cell.text || "" - if (regex.test(cellText.trim()) || cellText.trim().length == 0 || cell.fill.fgColor === undefined) { + if (regex.test(cellText.trim()) || cellText.trim().length == 0 || cell.fill?.fgColor === undefined) { d = false } } catch {} if (d) { let text = cell.text; - if (cell.fill.fgColor?.argb == "FFFFFF00") { + if (cell.fill?.fgColor?.argb == "FFFFFF00") { text += "\n(bude upřesněno)"; } final2[parsedKey] = text || ""