Skip to content

[v4] Unregister form field 'indexOf' of undefined #2847

Description

@exodusanto

Versions

  • vee-validate: 4.0.0-alpha.6
  • vue: 3.0.0-rc.5

Describe the bug
Using vue-route, if I change route from a view with a form to another one in console comes out this error.

Uncaught (in promise) TypeError: Cannot read property 'indexOf' of undefined
    at Object.unregister (vee-validate.esm.js:741)
    at vee-validate.esm.js:429

I think the problem is here, if the field has field.idx === -1 the object value will be deleted but the line after indexOf is called using that deleted value

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugUnintended behavior

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions