Skip to content

Commit fbbcd20

Browse files
committed
🔪 unnecessary 0 arg in slice(0) calls
1 parent c1ef691 commit fbbcd20

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/plot_api/plot_api.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3620,7 +3620,7 @@ function deleteFrames(gd, frameList) {
36203620
}
36213621
}
36223622

3623-
frameList = frameList.slice(0);
3623+
frameList = frameList.slice();
36243624
frameList.sort();
36253625

36263626
for(i = frameList.length - 1; i >= 0; i--) {

src/plots/command.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ function computeDataBindings(gd, args) {
372372
thisTraces[j] = traces ? traces[j] : j;
373373
}
374374
} else {
375-
thisTraces = traces ? traces.slice(0) : null;
375+
thisTraces = traces ? traces.slice() : null;
376376
}
377377

378378
// Convert [7] to just 7 when traces is null:

src/plots/plots.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2737,7 +2737,7 @@ plots.doCalcdata = function(gd, traces) {
27372737
// XXX: Is this correct? Needs a closer look so that *some* traces can be recomputed without
27382738
// *all* needing doCalcdata:
27392739
var calcdata = new Array(fullData.length);
2740-
var oldCalcdata = (gd.calcdata || []).slice(0);
2740+
var oldCalcdata = (gd.calcdata || []).slice();
27412741
gd.calcdata = calcdata;
27422742

27432743
// extra helper variables

0 commit comments

Comments
 (0)