Allow $ and _ at start of property identifiers

Fixes #1063
This commit is contained in:
Nick O'Leary
2016-11-21 21:36:18 +00:00
parent 071a04595a
commit 564902b886
3 changed files with 7 additions and 2 deletions

View File

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