Skip to content

Commit

Permalink
clean up some smells
Browse files Browse the repository at this point in the history
  • Loading branch information
brettedw committed Sep 18, 2023
1 parent 9a8e807 commit a67a12c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions web/src/features/moreCast2/components/MoreCast2Column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,15 @@ export class IndeterminateField implements ColDefGenerator, ForecastColDefGenera
}

public generateForecastColDef = (headerName?: string) => {
return this.colDefBuilder.generateForecastColDef(headerName || this.headerName)
return this.colDefBuilder.generateForecastColDef(headerName ?? this.headerName)
}

public generateColDef = () => {
return this.colDefBuilder.generateColDefWith(this.field, this.headerName, this.precision)
}

public generateColDefs = (headerName?: string) => {
return this.colDefBuilder.generateColDefs(headerName || this.headerName, this.includeBias)
return this.colDefBuilder.generateColDefs(headerName ?? this.headerName, this.includeBias)
}
}

Expand Down
4 changes: 2 additions & 2 deletions web/src/features/moreCast2/slices/dataSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ export const fillMissingWeatherIndeterminates = (
const weatherIndeterminates: WeatherIndeterminate[] = [...items]
for (const [key, values] of Object.entries(groupedByStationCode)) {
const stationCode = parseInt(key)
const stationName = stationMap.get(stationCode) || ''
const stationName = stationMap.get(stationCode) ?? ''
// We expect one actual per date in our date interval
if (values.length < dateInterval.length) {
for (const date of dateInterval) {
Expand Down Expand Up @@ -354,7 +354,7 @@ export const fillMissingPredictions = (
const allPredictions = [...items]
for (const [stationCodeAsString, weatherIndeterminatesByStationCode] of Object.entries(groupedByStationCode)) {
const stationCode = parseInt(stationCodeAsString)
const stationName = stationMap.get(stationCode) || ''
const stationName = stationMap.get(stationCode) ?? ''
const groupedByUtcTimestamp = createUtcTimeStampToWeatherIndeterminateGroups(
weatherIndeterminatesByStationCode,
dateInterval
Expand Down

0 comments on commit a67a12c

Please sign in to comment.