From 0b9a7c76b4280a61c51c87b71341074c75437d66 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Mon, 12 Aug 2019 00:48:13 -0700 Subject: [PATCH] Address review comments --- src/core/core.scale.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/core.scale.js b/src/core/core.scale.js index 612584cda49..a305aab241c 100644 --- a/src/core/core.scale.js +++ b/src/core/core.scale.js @@ -330,9 +330,10 @@ var Scale = Element.extend({ me.afterTickToLabelConversion(); - // IMPORTANT: below this point, we consider that `this.ticks` will NEVER change! me.ticks = labels; // BACKWARD COMPATIBILITY + // IMPORTANT: below this point, we consider that `this.ticks` will NEVER change! + // BACKWARD COMPAT: synchronize `_ticks` with labels (so potentially `this.ticks`) for (i = 0, ilen = labels.length; i < ilen; ++i) { ticks[i].label = labels[i]; @@ -437,8 +438,7 @@ var Scale = Element.extend({ }, buildTicks: helpers.noop, afterBuildTicks: function(ticks) { - var me = this; - return helpers.callback(me.options.afterBuildTicks, [me, ticks]) || ticks; + return helpers.callback(this.options.afterBuildTicks, [this, ticks]) || ticks; }, beforeTickToLabelConversion: function() {