Closed bachilli closed 7 years ago
I was surprised by this as we've been using cloneya a while without noticing this, but it's verified at https://jsfiddle.net/to4nLr6z/1/
The fix in #66 seems to work, but the original implementation it removes looks surprisingly complex so I wonder if it was originally written like that to meet some other requirement/edge case I've not spotted?
I think the only requirement/edge case that this fix can't meet is when you have a field with generic array without pré-setted index: ex. input type="text" name="thisisanarray[]"
or nested arrays with numeric indexes name="this[nested][0][array][0]"
Solved in merge. Need to recompile the .minified js
When cloning more than 10 elements the serializeIndex keeps the index at 10.