Guard against prototype extended arrays#769
Conversation
|
Thanks! The PR cannot be merged because, according to codeclimate, it overcomplicates the Anyway... we have others |
|
@davidenglishmusic thanks. What about other |
|
@tagliala thanks for the quick responses here. I am going to test out a few of the others to see if any additional changes are necessary and will post back. |
|
If this can cause issues, and some eslint configurations forbid the use of |
|
The guard clause has resolved the issue I was experiencing and mirrors the approach in the executeValidators method ( https://github.com/DavyJonesLocker/client_side_validations/blob/master/src/main.js#L156 ). It could be worthwhile moving away from the |
|
@davidenglishmusic I will proceed to merge and release during the weekend, thanks 👍 |
|
@davidenglishmusic thanks 16.0.2 gem / 0.0.5 npm released If you have more time to invest on CSV, there are some features I'm looking for help:
Ref: #692 |

Certain frameworks like Ember extend the array type with additional properties. Although they can be disabled ( https://guides.emberjs.com/release/configuring-ember/disabling-prototype-extensions/ ), it would remove some helpful functionality. In the case, the iteration through the additional properties by the execute validator code can result in
undefinedbeing passed as the third argument. The code change guards against that case.