findFunction returns array of undefined
See original GitHub issueHello there! Thanks for the great work with this package.
I’m running into an issue using findFunction. To my understanding, when a function is passed as the query parameter, it should execute my function with the current module and if I return true from my function, it should add the module that matches to the resulting array. However, line 137 of moduleraid.js is as follows:
results.push(moduleRaid.mObj[index]);
To me, this doesn’t really make sense since you’re getting property index
of the modules object, which would always be undefined. Instead, shouldn’t it push moduleRaid.mObj[mKey]
to the array, adding the module itself? In my tests this has worked…
I was going to do a PR with this, but reading the README, it states the following for what findFunction
is supposed to do:
findFunction(query)
: Return functions that include query (query can be either a string or a function)
So is this not supposed to return the module itself? If so, how would one execute a function to custom match modules and get the result, as I suggested above?
Thanks in advance.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
@pedroslopez this change is now released, sorry that it took so long. I saw you made a fork in the meantime to get your changes published.
Newest release also includes non-manual builds, so if new stuff comes up I’ll get to make releases quicker!
Sure, feel free to do that!