mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
docs: address maintainer review for PR #1044
This commit is contained in:
1 parent
8b68ff8412
commit
5a14a06a52
2 files changed
+11
-10
No files matched your search
@@ -22,11 +22,8 @@ export function adaptFirmsRecords(records) {
|
||||
const lat = Number(record?.lat);
|
||||
const lon = Number(record?.lon);
|
||||
if (
|
||||
![record?.lat, record?.lon].every(
|
||||
(value) =>
|
||||
typeof value === 'number' ||
|
||||
(typeof value === 'string' && value.trim() !== ''),
|
||||
) ||
|
||||
!hasCoordinateValue(record?.lat) ||
|
||||
!hasCoordinateValue(record?.lon) ||
|
||||
!Number.isFinite(lat) ||
|
||||
!Number.isFinite(lon) ||
|
||||
Math.abs(lat) > 90 ||
|
||||
@@ -121,3 +118,10 @@ function finiteNumber(value) {
|
||||
const number = Number(value);
|
||||
return Number.isFinite(number) ? number : 0;
|
||||
}
|
||||
|
||||
function hasCoordinateValue(value) {
|
||||
return (
|
||||
typeof value === 'number' ||
|
||||
(typeof value === 'string' && value.trim() !== '')
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user