Skip to content

$get is throwing error if path does not exist in the $data #781

Closed
@shredmaster

Description

@shredmaster

I use the validator extension and I am getting exception if v-model expression is more than one level ie form.name.

this is the line where exception occurred
if(!vm.$get('validator.'+model))

Base on the documentation, $get method should return undefined instead of throwing an error. I check the exports.$get method and there is no exception handling logic either.

exports.$get = function (exp) {
  var res = expParser.parse(exp)
  if (res) {
          return res.get.call(this, this)
  }
}

why is $get method throwing error in this case?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions