Use charAt rather than string index
Older versions of IE do not support [] access to string contents so charAt must be used. Fixes #677
This commit is contained in:
@@ -19,7 +19,8 @@ var AST = {
|
||||
this.hash = hash;
|
||||
this.strip = strip;
|
||||
|
||||
var escapeFlag = open[3] || open[2];
|
||||
// Must use charAt to support IE pre-10
|
||||
var escapeFlag = open.charAt(3) || open.charAt(2);
|
||||
this.escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
||||
|
||||
var id = this.id = rawParams[0];
|
||||
|
||||
+2
-2
@@ -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) === '~'
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user