Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann committed Aug 12, 2019
1 parent 642d66f commit 0b9a7c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/core.scale.js
Expand Up @@ -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];
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 0b9a7c7

Please sign in to comment.