Skip to content

Commit

Permalink
fixed nan height warning during rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
mantonovic committed Dec 5, 2019
1 parent d6156ce commit 3e62352
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/stratigraphy.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ class Stratigraphy extends React.Component {
} = this.state;

const rangeHeight = this.state.scale * (height);
const factor = pxm * (height / rangeHeight);

const factor = rangeHeight === 0?
0: pxm * (height / rangeHeight);

const offset = top * (height / rangeHeight);

const titleLimit = 30;
Expand Down

0 comments on commit 3e62352

Please sign in to comment.