Skip to content

Commit 9c652e4

Browse files
committed
Allow isReserved() to handle non-string inputs
1 parent fc9d5ca commit 9c652e4

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)