Skip to content

ignore_case check against undefined value throws error instead of returning false #6

@MalcolmDwyer

Description

@MalcolmDwyer
data = {
}

test(data, {
  path: '/foo',
  value: 'whatever',
  op: 'contains',
  ignore_case: true
});

With data.foo undefined, and ignore_case set on the predicate, the test throws an error instead of returning false.
Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions