mirror of
https://github.com/netbymatt/ws4kp.git
synced 2026-04-14 07:39:29 -07:00
don't overwrite timestamps when enhancing with mapclick
This commit is contained in:
@@ -101,7 +101,11 @@ class CurrentWeather extends WeatherDisplay {
|
||||
debugContext: 'currentweather',
|
||||
});
|
||||
|
||||
// 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) => {
|
||||
const field = requiredFields.find((f) => f.name === fieldName && f.required);
|
||||
|
||||
Reference in New Issue
Block a user