Skip to content

Commit

Permalink
Clean up guaranteed truthy property reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Feb 4, 2019
1 parent bef7403 commit 916bf3b
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -23,8 +23,8 @@ export const formatHistogramData = (histograms: HistogramSeries[]): FormattedHis
.filter(series => series !== null && series !== undefined)
.reduce(
(accumulatedData: FormattedHistogramData, data) => {
// @ts-ignore data will not be null/undefined because those elements are filtered
data.forEach(dataPoint => {
// `data` will not be null/undefined because those elements are filtered
data!.forEach(dataPoint => {
const { x, x0, downCount, upCount } = dataPoint;
const findPointInSeries = (hdp: HistogramDataPoint) => hdp.x === x && hdp.x0 === x0;
const upEntry = accumulatedData.upSeriesData.find(findPointInSeries);
Expand Down

0 comments on commit 916bf3b

Please sign in to comment.