Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialization settings object is not properly copied #8

Open
romelperez opened this issue Apr 20, 2017 · 0 comments
Open

Initialization settings object is not properly copied #8

romelperez opened this issue Apr 20, 2017 · 0 comments
Assignees
Labels
Milestone

Comments

@romelperez
Copy link
Member

When initializing the validator (currently on the plugin) the settings object provided is not copied but somehow referenced.

Apparently the fields DOM elements references are kept when the same settings object is provided to initialize either the same form rendered again on the same window instance of in another form with the same fields.

An hypothesis is: the object is copied but shallowly, and the arrays within are referenced and not overwritten (fields and fieldsets) so the DOM elements are referenced when the same settings object is provided in another instance.

The solution for now is to provide a different settings object each time the vulcanval is instantiated.

@romelperez romelperez added the bug label Apr 20, 2017
@romelperez romelperez added this to the general milestone Apr 20, 2017
@romelperez romelperez self-assigned this Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant