You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe this requires a refactor on a couple levels:
It requires eval. If eval is required you should rather echo the code from config and inject it into the spConfig object.
It has a cyclomatic complexity of 18. The highest, at best, should be 4-5. That means we need to refactor it to use a number of sub functions or utilize map, guard functions.
I have begun a refactor, but may require help to discuss rationale.
The text was updated successfully, but these errors were encountered:
@philwinkle Yes the product.js requires a js eval. It evaluates the code filled in the config fields Js Callback after main image change and Js Callback after media change. Those are executed after the main product image or the media block are changed. I'm not sure I understand how I can echo it in the config ad inject it in the spConfig object.
You have my skype Id so you can fill me in on what I'm missing.
We can also talk about reducing the cyclomatic complexity.
@philwinkle This should be fixed in version 2.0.0. All functions from product.js have the max cyclomatic complexity of 5. (at least that's what I'm getting from the tool I'm using)
I believe this requires a refactor on a couple levels:
I have begun a refactor, but may require help to discuss rationale.
The text was updated successfully, but these errors were encountered: