Skip to content

Commit 445cf19

Browse files
committed
[].slice instead of Array.prototype.slice
1 parent 1d4b41a commit 445cf19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/core.controller.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ defaults._set('global', {
4141
* returns a deep copy of the result, thus doesn't alter inputs.
4242
*/
4343
function mergeScaleConfig(/* config objects ... */) {
44-
return helpers.merge({}, Array.prototype.slice.call(arguments), {
44+
return helpers.merge({}, [].slice.call(arguments), {
4545
merger: function(key, target, source, options) {
4646
if (key === 'xAxes' || key === 'yAxes') {
4747
var slen = source[key].length;
@@ -53,7 +53,7 @@ function mergeScaleConfig(/* config objects ... */) {
5353

5454
for (i = 0; i < slen; ++i) {
5555
scale = source[key][i];
56-
type = helpers.valueOrDefault(scale.type, key === 'xAxes' ? 'category' : 'linear');
56+
type = valueOrDefault(scale.type, key === 'xAxes' ? 'category' : 'linear');
5757

5858
if (i >= target[key].length) {
5959
target[key].push({});
@@ -81,7 +81,7 @@ function mergeScaleConfig(/* config objects ... */) {
8181
* a deep copy of the result, thus doesn't alter inputs.
8282
*/
8383
function mergeConfig(/* config objects ... */) {
84-
return helpers.merge({}, Array.prototype.slice.call(arguments), {
84+
return helpers.merge({}, [].slice.call(arguments), {
8585
merger: function(key, target, source, options) {
8686
var tval = target[key] || {};
8787
var sval = source[key];

0 commit comments

Comments
 (0)