We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09ce6ae commit bf79a0fCopy full SHA for bf79a0f
processing.js
@@ -469,15 +469,10 @@
469
}
470
471
function ArrayList(a) {
472
- var array;
+ var array = [];
473
474
if (a && a.toArray) {
475
array = a.toArray();
476
- } else {
477
- array = [];
478
- if (typeof a === "number") {
479
- array.length = a > 0 ? a : 0;
480
- }
481
482
483
/**
test/unit/arrayList.pde
@@ -23,4 +23,4 @@ ArrayList list2 = new ArrayList(list1);
23
_checkEqual(list1, list2);
24
25
ArrayList list3 = new ArrayList(5);
26
-_checkEqual(list3.size(), 5);
+_checkEqual(list3.size(), 0);
0 commit comments