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 13, 2019
1 parent 50be2ce commit ecc654a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core/core.scale.js
Original file line number Diff line number Diff line change
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 ecc654a

Please sign in to comment.