Skip to content

Commit

Permalink
Move uninitialized variables, update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kurkle committed Oct 18, 2019
1 parent 2124438 commit e3f3077
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/core/core.datasetController.js
Expand Up @@ -400,7 +400,6 @@ helpers.extend(DatasetController.prototype, {
var options = chart.options.elements[me.dataElementType.prototype._type] || {};
var elementOptions = me._dataElementOptions;
var values = {};
var keys, i, ilen, key;

// Scriptable options
var context = {
Expand All @@ -410,10 +409,10 @@ helpers.extend(DatasetController.prototype, {
datasetIndex: me.index
};

// information about resolution
var info = {
cacheable: !custom
};
// `resolve` sets cacheable to `false` if any option is indexed or scripted
var info = {cacheable: !custom};

var keys, i, ilen, key;

custom = custom || {};

Expand Down
3 changes: 2 additions & 1 deletion src/helpers/helpers.options.js
Expand Up @@ -114,8 +114,9 @@ module.exports = {
* @param {object} [context] - If defined and the current value is a function, the value
* is called with `context` as first argument and the result becomes the new input.
* @param {number} [index] - If defined and the current value is an array, the value
* @param {object} [info] - object to return information about resolution in
* at `index` become the new input.
* @param {object} [info] - object to return information about resolution in
* @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable.
* @since 2.7.0
*/
resolve: function(inputs, context, index, info) {
Expand Down

0 comments on commit e3f3077

Please sign in to comment.