mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-13 23:29:36 -07:00
more generalized fix for mapclick enhanced timestamps close #203
moves changes made in 0b47cf79c1 to the mapclick processing for benefit of other mapclick calls
This commit is contained in:
@@ -102,9 +102,8 @@ class CurrentWeather extends WeatherDisplay {
|
||||
});
|
||||
|
||||
// copy enhanced data and restore the timestamp if it was overwritten by older data from mapclick
|
||||
const { timestamp } = candidateObservation.features[0].properties;
|
||||
|
||||
candidateObservation.features[0].properties = enhancedResult.data;
|
||||
candidateObservation.features[0].properties.timestamp = timestamp;
|
||||
|
||||
const { missingFields } = enhancedResult;
|
||||
const missingRequired = missingFields.filter((fieldName) => {
|
||||
|
||||
@@ -650,7 +650,7 @@ export const enhanceObservationWithMapClick = async (observationData, options =
|
||||
}
|
||||
|
||||
return {
|
||||
data: mapClickProps,
|
||||
data: { ...mapClickProps, timestamp: observationData.timestamp },
|
||||
wasImproved: true,
|
||||
improvements,
|
||||
missingFields: [...mapClickMissingRequired, ...mapClickMissingOptional],
|
||||
|
||||
Reference in New Issue
Block a user