error in qwerty mobile #77

Closed
CheloXL opened this Issue May 22, 2012 · 1 comment

Projects

None yet

2 participants

@CheloXL

If you pass a non-existant node as root, as a string (so, for example qwerty("li[class='aClass']", "ul#two"), where there is no ul with ID two on the document) an error is thrown, since root returns undefined. A simple fix would be to add a root && ... to the line root = isFinite(root.length) && root[0] && !root.nodeName ? root[0] : root

@ded
Owner

right on. thanks for the report. i'll have a look

@ded ded closed this Feb 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment