Skip to content

Commit 679536e

Browse files
FarSeeingtimmywil
authored andcommitted
charAt -> string indexing. Close jquerygh-1359.
1 parent 4228905 commit 679536e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/core/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var rootjQuery,
2323

2424
// Handle HTML strings
2525
if ( typeof selector === "string" ) {
26-
if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
26+
if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
2727
// Assume that strings that start and end with <> are HTML and skip the regex check
2828
match = [ null, selector, null ];
2929

src/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function vendorPropName( style, name ) {
4646
}
4747

4848
// check for vendor prefixed names
49-
var capName = name.charAt(0).toUpperCase() + name.slice(1),
49+
var capName = name[0].toUpperCase() + name.slice(1),
5050
origName = name,
5151
i = cssPrefixes.length;
5252

0 commit comments

Comments
 (0)