mirror of
https://github.com/Irev-Dev/Round-Anything.git
synced 2025-01-29 08:57:39 +01:00
Correctly instanciate recursion index
Caller of the flatternRecursion method does not set necessarily the index value and OpenSCAD complain that this result in adding number to undefined.
This commit is contained in:
parent
c04a81f25c
commit
26fb282626
@ -90,7 +90,7 @@ let(
|
||||
)
|
||||
[polyhedronPoints, polyhedronFaces, layerLength];
|
||||
|
||||
function flatternRecursion(array, init=[], currentIndex)=
|
||||
function flatternRecursion(array, init=[], currentIndex=0)=
|
||||
// this is a private function, init and currentIndex are for the function's use
|
||||
// only for when it's calling itself, which is why there is a simplified version flatternArray that just calls this one
|
||||
// array= array to flattern by one level of nesting
|
||||
|
Loading…
x
Reference in New Issue
Block a user