Closed daronspence closed 4 years ago
Can you explain why this change is necessary? The code basically does the exact same thing right?
@actengage you would think so, but unfortunately they don't.
I moved the code into a pen that you can look at. https://codepen.io/daronspence/pen/QWbLRgN?editors=0012
If you look in the console, you'll see the responses from the two loops are completely different.
Hopefully that helps!
Right. I actually knew that was the intended behavior, however I didn't set the key properly. Your solution makes more sense.
Can you please also publish this fix to npm repository? It seems that it is still isn't updated.
Hey! We're using this on a project and ran into a little bug when trying to add
types
options. Idk if this has always been the case, but using the for loop was only returning the index of the option and in the array and not the key.Hopefully this should be a quick and easy thing to merge in? As it is, I believe this is broken for everyone, though admittedly, they might be relying on that broken implementation.
Thanks!