mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-11-28 18:28:04 -08:00
Merge branch 'eslint-update' into update-basemaps
This commit is contained in:
48 files changed
+804
-991
No files matched your search
@@ -6,11 +6,6 @@ const DEFAULT_REQUEST_TIMEOUT = 15000; // For example, with 3 retries: 15s+1s+15
|
||||
const safeJson = async (url, params) => {
|
||||
try {
|
||||
const result = await json(url, params);
|
||||
// Return an object with both data and url if params.returnUrl is true
|
||||
if (params?.returnUrl) {
|
||||
return result;
|
||||
}
|
||||
// If caller didn't specify returnUrl, result is the raw API response
|
||||
return result;
|
||||
} catch {
|
||||
// Error already logged in fetchAsync; return null to be "safe"
|
||||
@@ -21,11 +16,6 @@ const safeJson = async (url, params) => {
|
||||
const safeText = async (url, params) => {
|
||||
try {
|
||||
const result = await text(url, params);
|
||||
// Return an object with both data and url if params.returnUrl is true
|
||||
if (params?.returnUrl) {
|
||||
return result;
|
||||
}
|
||||
// If caller didn't specify returnUrl, result is the raw API response
|
||||
return result;
|
||||
} catch {
|
||||
// Error already logged in fetchAsync; return null to be "safe"
|
||||
@@ -36,11 +26,6 @@ const safeText = async (url, params) => {
|
||||
const safeBlob = async (url, params) => {
|
||||
try {
|
||||
const result = await blob(url, params);
|
||||
// Return an object with both data and url if params.returnUrl is true
|
||||
if (params?.returnUrl) {
|
||||
return result;
|
||||
}
|
||||
// If caller didn't specify returnUrl, result is the raw API response
|
||||
return result;
|
||||
} catch {
|
||||
// Error already logged in fetchAsync; return null to be "safe"
|
||||
|
||||
@@ -506,7 +506,8 @@ export const enhanceObservationWithMapClick = async (observationData, options =
|
||||
data: observationData,
|
||||
wasImproved: false,
|
||||
improvements: [],
|
||||
missingFields: [...missingRequired, ...missingOptional],
|
||||
missingRequired,
|
||||
missingOptional,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -653,7 +654,8 @@ export const enhanceObservationWithMapClick = async (observationData, options =
|
||||
data: { ...mapClickProps, timestamp: observationData.timestamp },
|
||||
wasImproved: true,
|
||||
improvements,
|
||||
missingFields: [...mapClickMissingRequired, ...mapClickMissingOptional],
|
||||
missingRequired: mapClickMissingRequired,
|
||||
missingOptional: mapClickMissingOptional,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ const calculateScrollTiming = (list, container, options = {}) => {
|
||||
scrollTiming: {
|
||||
initialCounts,
|
||||
pixelsPerCount,
|
||||
maxOffset: scrollableHeight,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user