summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-12-23 02:18:57 -0600
committerkpdecker <kpdecker@gmail.com>2013-12-23 02:18:57 -0600
commit3daef9d30897a7cca7a471ad5f21b955ff54b131 (patch)
treee231b1518a1143c6d63567e1fac369bb9c7c27de /src
parent7f0ded4926be2f5c574e9a3d2187f85f0e0c5bbc (diff)
downloadhandlebars.js-3daef9d30897a7cca7a471ad5f21b955ff54b131.zip
handlebars.js-3daef9d30897a7cca7a471ad5f21b955ff54b131.tar.gz
handlebars.js-3daef9d30897a7cca7a471ad5f21b955ff54b131.tar.bz2
Use charAt rather than string index
Older versions of IE do not support [] access to string contents so charAt must be used. Fixes #677
Diffstat (limited to 'src')
-rw-r--r--src/handlebars.yy4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handlebars.yy b/src/handlebars.yy
index 71a8575..93797f5 100644
--- a/src/handlebars.yy
+++ b/src/handlebars.yy
@@ -6,8 +6,8 @@
function stripFlags(open, close) {
return {
- left: open[2] === '~',
- right: close[0] === '~' || close[1] === '~'
+ left: open.charAt(2) === '~',
+ right: close.charAt(0) === '~' || close.charAt(1) === '~'
};
}