Permalink
Browse files

IE7 doesn't like using array syntax on strings, use .charAt() instead.

  • Loading branch information...
1 parent 121b1be commit 79597379f580c1883a6bb5f31dfe2a32958c7157 @jeamland jeamland committed Feb 21, 2012
Showing with 5 additions and 5 deletions.
  1. +4 −4 lib/lexer.js
  2. +1 −1 support/compile.js
View
@@ -121,9 +121,9 @@ Lexer.prototype = {
, nend = 0
, pos = 0;
for (var i = 0, len = str.length; i < len; ++i) {
- if (start == str[i]) {
+ if (start == str.charAt(i)) {
++nstart;
- } else if (end == str[i]) {
+ } else if (end == str.charAt(i)) {
if (++nend == nstart) {
pos = i;
break;
@@ -435,7 +435,7 @@ Lexer.prototype = {
*/
attrs: function() {
- if ('(' == this.input[0]) {
+ if ('(' == this.input.charAt(0)) {
var index = this.indexOfDelimiters('(', ')')
, str = this.input.substr(1, index-1)
, tok = this.tok('attrs')
@@ -561,7 +561,7 @@ Lexer.prototype = {
}
for (var i = 0; i < len; ++i) {
- parse(str[i]);
+ parse(str.charAt(i));
}
parse(',');
View
@@ -150,7 +150,7 @@ var browser = {
relative: function(parent) {
return function(p){
- if ('.' != p[0]) return require(p);
+ if ('.' != p.charAt(0)) return require(p);
var path = parent.split('/')
, segs = p.split('/');

0 comments on commit 7959737

Please sign in to comment.