Skip to content

Commit

Permalink
Merge pull request #4405 from rosco54/Fix_for_merged_pull_request_4363
Browse files Browse the repository at this point in the history
Fix a potential crash condition when collapsing series'
  • Loading branch information
junedchhipa committed Apr 16, 2024
2 parents c42f811 + abb5542 commit dfd0973
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/modules/Scales.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,8 @@ export default class Scales {
(yMin === Number.MIN_VALUE && yMax === -Number.MAX_VALUE)
) {
// when all values are 0
if (gotMin && gotMax) {
yMin = gl.minY
yMax = gl.maxY
} else if (gotMin) {
yMin = gl.minY
yMax = yMin + ticks
} else if (gotMax) {
yMax = gl.maxY
yMin = yMax - ticks
} else {
yMin = 0
yMax = ticks
}
yMin = Utils.isNumber(axisCnf.min) ? axisCnf.min : 0
yMax = Utils.isNumber(axisCnf.max) ? axisCnf.max : yMin + ticks
gl.allSeriesCollapsed = false
}

Expand Down

0 comments on commit dfd0973

Please sign in to comment.