fix: do not display an error for an empty CSV (#2505)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run

fix #577
fix #2491
fix #1546
This commit is contained in:
Yohan Boniface 2025-02-11 15:00:16 +01:00 committed by GitHub
commit c71a6aafdb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,8 +103,12 @@ export class Formatter {
message: err[0].message,
})
}
Alert.error(message, 10000)
console.debug(err)
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)