JSONSelect icon indicating copy to clipboard operation
JSONSelect copied to clipboard

:val cannot match boolean

Open AndrewIsh opened this issue 10 years ago • 0 comments

As mentioned here, it is not possible to do the following:

.preferred:val(true)

The following error results:

Error: string expected in '.global:val(true)'
    at te (http://213.138.111.239:3000/bower_components/jsonselect/src/jsonselect.js:44:13)
    at parse_selector (http://213.138.111.239:3000/bower_components/jsonselect/src/jsonselect.js:350:50)
    at parse (http://213.138.111.239:3000/bower_components/jsonselect/src/jsonselect.js:225:21)
    at compile (http://213.138.111.239:3000/bower_components/jsonselect/src/jsonselect.js:503:18)
    at Object.exports.match (http://213.138.111.239:3000/bower_components/jsonselect/src/jsonselect.js:516:16)

@samcheung closed his issue with a workaround, but I think it would be nice to see support for boolean matching to be supported.

If this is considered by others to be a desirable requirement, I'm happy to take a look at creating a PR.

Cheers Andrew

AndrewIsh avatar Jan 12 '16 14:01 AndrewIsh