From 6c0efd50bc4edffb77329ae0e873b0ff6657712b Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 23 Aug 2021 14:21:58 +0200 Subject: [PATCH] linting (#14115) --- plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 b/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 index 8a4a69a02e0..a6937e51efc 100644 --- a/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 +++ b/plugins/poll/assets/javascripts/widgets/discourse-poll.js.es6 @@ -470,6 +470,7 @@ createWidget("discourse-poll-pie-canvas", { }); const el = document.getElementById(`poll-results-chart-${attrs.id}`); + // eslint-disable-next-line no-undef this._chart = new Chart(el.getContext("2d"), config); }); }, @@ -566,7 +567,7 @@ function pieChartConfig(data, labels, opts = {}) { plugins: { legend: { labels: { - generateLabels: function (chart) { + generateLabels: function () { return labels.map((text, index) => { return { fillStyle: getColors(data.length)[index],