Merge pull request #2651 from arnihermann/use-charat-not-string-index-markup-diff

Use String.charAt to lookup string characters by index
This commit is contained in:
Paul O’Shannessy committed 2014-12-03 10:57:30 -08:00
commit a66430aec3
1 file changed
+1 -1
+1 -1
View File
@@ -63,7 +63,7 @@ var findComponentRootReusableArray = [];
function firstDifferenceIndex(string1, string2) {
var minLen = Math.min(string1.length, string2.length);
for (var i = 0; i < minLen; i++) {
if (string1[i] !== string2[i]) {
if (string1.charAt(i) !== string2.charAt(i)) {
return i;
}
}