fix: do not display an error for an empty CSV

fix #577
fix #2491
fix #1546
This commit is contained in:
Yohan Boniface 2025-02-11 13:45:40 +01:00
parent 815ff046ff
commit 8e13a15645

View file

@ -103,8 +103,12 @@ export class Formatter {
message: err[0].message,
})
}
Alert.error(message, 10000)
if (str.split(/\r\n|\r|\n/).length <= 2) {
// Seems like a blank CSV, let's not warn
console.debug(err)
} else {
Alert.error(message, 10000)
}
}
if (result?.features.length) {
callback(result)