Tidy up merge commit of validatePropertyExpression

This commit is contained in:
Nick O'Leary
2017-01-06 14:32:37 +00:00
parent f973396821
commit 4c6157a06e
2 changed files with 3 additions and 3 deletions

View File

@@ -164,7 +164,7 @@ function normalisePropertyExpression(str) {
if (i===length-1) {
throw new Error("Invalid property expression: unterminated expression");
}
// Next char is a-z
// Next char is first char of an identifier: a-z 0-9 $ _
if (!/[a-z0-9\$\_]/i.test(str[i+1])) {
throw new Error("Invalid property expression: unexpected "+str[i+1]+" at position "+(i+1));
}