Skip to content
Prev Previous commit
Next Next commit
fix the regex check to see if the query is for selecting element by i…
…d only in queryParser
  • Loading branch information
eminaz committed Jun 26, 2017
commit 10bd9d8e1ed54f08debf8defa1f8783fd9010235
2 changes: 1 addition & 1 deletion src/core/propertyTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function numberParse (value) {
function selectorParse (value) {
if (!value) { return null; }
if (typeof value !== 'string') { return value; }
if (value[0] === '#' && !/[.,[: ]/.test(value)) {
if (value[0] === '#' && !/[,> ]/.test(value)) {
// when selecting element by id only, use getElementById for better performance
return document.getElementById(value.substring(1));
}
Expand Down