Skip to content

Commit

Permalink
Fix undefined variable (chartjs#6698)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored and etimberg committed Nov 10, 2019
1 parent efa5523 commit 3102fab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/core.scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ var Scale = Element.extend({
*/
_getLabels: function() {
var data = this.chart.data;
return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels;
return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];
},

// These methods are ordered by lifecyle. Utilities then follow.
Expand Down

0 comments on commit 3102fab

Please sign in to comment.