]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix undefined variable (#6698)
authorBen McCann <322311+benmccann@users.noreply.github.com>
Sun, 10 Nov 2019 02:54:51 +0000 (18:54 -0800)
committerEvert Timberg <evert.timberg+github@gmail.com>
Sun, 10 Nov 2019 02:54:51 +0000 (21:54 -0500)
src/core/core.scale.js

index 914bdefaae1ae0a93442768fcffaa14568fad805..0c1413d4a0398ac2c126c8f63acb63bda9f8c412 100644 (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.