Fix undefined variable (#6698)

This commit is contained in:
Ben McCann 2019-11-09 18:54:51 -08:00 committed by Evert Timberg
parent a985fecc98
commit c44229fb96

View File

@ -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.