Fix handling of boolean escape in MustacheNode
Fixes issue with Ember compatibility due to direct instantiation of MustacheNode.
This commit is contained in:
@@ -19,9 +19,14 @@ var AST = {
|
|||||||
this.hash = hash;
|
this.hash = hash;
|
||||||
this.strip = strip;
|
this.strip = strip;
|
||||||
|
|
||||||
// Must use charAt to support IE pre-10
|
// Open may be a string parsed from the parser or a passed boolean flag
|
||||||
var escapeFlag = open.charAt(3) || open.charAt(2);
|
if (open != null && open.charAt) {
|
||||||
this.escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
// Must use charAt to support IE pre-10
|
||||||
|
var escapeFlag = open.charAt(3) || open.charAt(2);
|
||||||
|
this.escaped = escapeFlag !== '{' && escapeFlag !== '&';
|
||||||
|
} else {
|
||||||
|
this.escaped = !!open;
|
||||||
|
}
|
||||||
|
|
||||||
var id = this.id = rawParams[0];
|
var id = this.id = rawParams[0];
|
||||||
var params = this.params = rawParams.slice(1);
|
var params = this.params = rawParams.slice(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user