Skip to content

Commit b4d6924

Browse files
benmccannetimberg
authored andcommitted
Fix handling of null labels (#4795)
1 parent b94532c commit b4d6924

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/core.scale.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ module.exports = function(Chart) {
662662

663663
// Since we always show the last tick,we need may need to hide the last shown one before
664664
shouldSkip = (skipRatio > 1 && i % skipRatio > 0) || (i % skipRatio === 0 && i + skipRatio >= tickCount);
665-
if (shouldSkip && i !== tickCount - 1 || helpers.isNullOrUndef(tick.label)) {
665+
if (shouldSkip && i !== tickCount - 1) {
666666
// leave tick in place but make sure it's not displayed (#4635)
667667
delete tick.label;
668668
}
@@ -712,7 +712,7 @@ module.exports = function(Chart) {
712712

713713
helpers.each(ticks, function(tick, index) {
714714
// autoskipper skipped this tick (#4635)
715-
if (tick.label === undefined) {
715+
if (helpers.isNullOrUndef(tick.label)) {
716716
return;
717717
}
718718

0 commit comments

Comments
 (0)