From fdffec73c36a73443182b206595b239924d294cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81rni=20Hermann=20Reynisson?= Date: Wed, 3 Dec 2014 14:49:55 +0000 Subject: [PATCH] Use String.charAt for character by index lookup Using object property accessor for string character lookup breaks in non-modern browsers. --- src/browser/ui/ReactMount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/ui/ReactMount.js b/src/browser/ui/ReactMount.js index 6e72848ca1a06..fd8036d540050 100644 --- a/src/browser/ui/ReactMount.js +++ b/src/browser/ui/ReactMount.js @@ -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; } }