Fix undefined variable (#6699)

This commit is contained in:
Ben McCann 2019-11-08 16:59:44 -08:00 committed by Evert Timberg
parent fcf76c5edd
commit 46aff21a3d

View File

@ -400,7 +400,7 @@ class Scale extends Element {
*/
_getLabels() {
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.