Skip to content

Commit f140770

Browse files
committed
Merge pull request #780 from njovin/dev
Allow isReserved() to handle non-string inputs
2 parents fc9d5ca + 9c652e4 commit f140770

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util/lang.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
exports.isReserved = function (str) {
9-
var c = str.charCodeAt(0)
9+
var c = (str + '').charCodeAt(0)
1010
return c === 0x24 || c === 0x5F
1111
}
1212

0 commit comments

Comments
 (0)