Skip to content

Commit d8fd7a5

Browse files
committed
troubleshooting
1 parent 5c5d788 commit d8fd7a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/lib/geodata.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ function parseCsv(csvText) {
109109

110110
const headers = lines[0].split('\t').map(h => h.trim());
111111
console.log("headers", headers);
112+
if (headers.length < 5) {
113+
throw new Error("Invalid CSV headers");
114+
}
112115

113116
// Pre-allocate array for better performance
114117
const rows = new Array(lines.length - 1);

0 commit comments

Comments
 (0)