Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
fix: heatmap errors with null data
Browse files Browse the repository at this point in the history
  • Loading branch information
Michelle Thomas committed Jun 26, 2019
1 parent ca591ec commit d773983
Show file tree
Hide file tree
Showing 2 changed files with 209 additions and 160 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ function Heatmap(element, props) {

for (let i = 0; i < records.length; i++) {
const datum = records[i];
longestX = Math.max(longestX, datum.x.toString().length || 1);
longestY = Math.max(longestY, datum.y.toString().length || 1);
longestX = Math.max(longestX, (datum.x && datum.x.toString().length) || 1);
longestY = Math.max(longestY, (datum.y && datum.y.toString().length) || 1);
}

if (leftMargin === 'auto') {
Expand Down
Loading

0 comments on commit d773983

Please sign in to comment.