summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/helpers.js')
-rw-r--r--lib/handlebars/compiler/helpers.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/handlebars/compiler/helpers.js b/lib/handlebars/compiler/helpers.js
index 7f784ad..31daf6d 100644
--- a/lib/handlebars/compiler/helpers.js
+++ b/lib/handlebars/compiler/helpers.js
@@ -36,13 +36,13 @@ export function preparePath(data, parts, locInfo) {
/*jshint -W040 */
locInfo = this.locInfo(locInfo);
- var original = data ? '@' : '',
+ let original = data ? '@' : '',
dig = [],
depth = 0,
depthString = '';
- for (var i = 0, l = parts.length; i < l; i++) {
- var part = parts[i].part,
+ for (let i = 0, l = parts.length; i < l; i++) {
+ let part = parts[i].part,
// If we have [] syntax then we do not treat path references as operators,
// i.e. foo.[this] resolves to approximately context.foo['this']
isLiteral = parts[i].original !== part;
@@ -66,7 +66,7 @@ export function preparePath(data, parts, locInfo) {
export function prepareMustache(path, params, hash, open, strip, locInfo) {
/*jshint -W040 */
// Must use charAt to support IE pre-10
- var escapeFlag = open.charAt(3) || open.charAt(2),
+ let escapeFlag = open.charAt(3) || open.charAt(2),
escaped = escapeFlag !== '{' && escapeFlag !== '&';
return new this.MustacheStatement(path, params, hash, escaped, strip, this.locInfo(locInfo));
@@ -75,13 +75,13 @@ export function prepareMustache(path, params, hash, open, strip, locInfo) {
export function prepareRawBlock(openRawBlock, content, close, locInfo) {
/*jshint -W040 */
if (openRawBlock.path.original !== close) {
- var errorNode = {loc: openRawBlock.path.loc};
+ let errorNode = {loc: openRawBlock.path.loc};
throw new Exception(openRawBlock.path.original + " doesn't match " + close, errorNode);
}
locInfo = this.locInfo(locInfo);
- var program = new this.Program([content], null, {}, locInfo);
+ let program = new this.Program([content], null, {}, locInfo);
return new this.BlockStatement(
openRawBlock.path, openRawBlock.params, openRawBlock.hash,
@@ -94,14 +94,14 @@ export function prepareBlock(openBlock, program, inverseAndProgram, close, inver
/*jshint -W040 */
// When we are chaining inverse calls, we will not have a close path
if (close && close.path && openBlock.path.original !== close.path.original) {
- var errorNode = {loc: openBlock.path.loc};
+ let errorNode = {loc: openBlock.path.loc};
throw new Exception(openBlock.path.original + ' doesn\'t match ' + close.path.original, errorNode);
}
program.blockParams = openBlock.blockParams;
- var inverse,
+ let inverse,
inverseStrip;
if (inverseAndProgram) {