Faulty recursive function makes functionality break
z0zz0 opened this issue · 2 comments
Our findings
Trying the latest release 0.2.14 for the new vendor options implemented completely breaks. We are certain to have found the reason for this.
Looking at the function called renderStrokeMarks in sldreader.js, we can see that it is a recursive function that do not give itself all the parameters, specifically, the parameter called options is not given recursively (sldreaderjs:2178 and sldreader.js:2195). This renders "options" as undefined which causes an error further down in the code (sldreader.js:2224).
Picture with comments on found faulty code
Picture of where the error occurs
Picture of our fix (locally)
Cheers!
Good catch!
It looks like this only fails on multipart features, which explains why I didn't see this happening with my test data. I'll fix this in the next release.
I have published v0.2.15 with this fix.