We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60bd4fc commit e45bff9Copy full SHA for e45bff9
src/components/fx/helpers.js
@@ -17,14 +17,18 @@ exports.getSubplot = function getSubplot(trace) {
17
18
// convenience functions for mapping all relevant axes
19
exports.flat = function flat(subplots, v) {
20
- var out = [];
21
- for(var i = subplots.length; i > 0; i--) out.push(v);
+ var out = new Array(subplots.length);
+ for(var i = 0; i < subplots.length; i++) {
22
+ out[i] = v;
23
+ }
24
return out;
25
};
26
27
exports.p2c = function p2c(axArray, v) {
- for(var i = 0; i < axArray.length; i++) out.push(axArray[i].p2c(v));
28
+ var out = new Array(axArray.length);
29
+ for(var i = 0; i < axArray.length; i++) {
30
+ out[i] = axArray[i].p2c(v);
31
32
33
34
0 commit comments