hotfix: search handles null values instead of arrays full of nulls
This commit is contained in:
parent
85efd83485
commit
7a6be53e0b
@ -202,10 +202,10 @@ function createPeriod(from, to, currentMonth, currentYear) {
|
||||
function calculateScoreForPeriod(type, travelPeriods, region, searchLowParam, searchMaxParam) {
|
||||
// console.log('getScoreAndAverageFromClimate for', region.name, type)
|
||||
|
||||
const singleScores = travelPeriods.map(period => {
|
||||
const singleScores = travelPeriods. map(period => {
|
||||
let res = {
|
||||
type: type,
|
||||
value: region[type][period.month - 1],
|
||||
value: region[type] !== null ? region[type][period.month - 1] : null,
|
||||
days: period.days
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user