Skip to content

Commit

Permalink
Fixed #8621, conditions extended in getSlotWidth wrap function.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denyllon authored and TorsteinHonsi committed Jul 31, 2018
1 parent ac32b37 commit 7185e7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/parts-3d/Axis.js
Expand Up @@ -604,7 +604,7 @@ wrap(Axis.prototype, 'getSlotWidth', function (proceed, tick) {

// Check whether the tick is not the first one and previous tick exists,
// then calculate position of previous label.
if (tickId !== 0 && prevTick) {
if (tickId !== 0 && prevTick && prevTick.label.xy) { // #8621
prevLabelPos = perspective3D({
x: prevTick.label.xy.x,
y: prevTick.label.xy.y,
Expand All @@ -613,7 +613,7 @@ wrap(Axis.prototype, 'getSlotWidth', function (proceed, tick) {
}
// If next label position is defined, then recalculate its position
// basing on the perspective.
if (nextTick && nextTick.label.xy) {
if (nextTick && nextTick && nextTick.label.xy) {
nextLabelPos = perspective3D({
x: nextTick.label.xy.x,
y: nextTick.label.xy.y,
Expand Down

0 comments on commit 7185e7e

Please sign in to comment.