summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/code-gen.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/code-gen.js')
-rw-r--r--lib/handlebars/compiler/code-gen.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/handlebars/compiler/code-gen.js b/lib/handlebars/compiler/code-gen.js
index 7d1b4ca..30f0735 100644
--- a/lib/handlebars/compiler/code-gen.js
+++ b/lib/handlebars/compiler/code-gen.js
@@ -79,18 +79,18 @@ CodeGen.prototype = {
},
empty: function(loc) {
- loc = loc || this.currentLocation || {};
- return new SourceNode(loc.firstLine, loc.firstColumn, this.srcFile);
+ loc = loc || this.currentLocation || {start:{}};
+ return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
},
wrap: function(chunk, loc) {
if (chunk instanceof SourceNode) {
return chunk;
}
- loc = loc || this.currentLocation || {};
+ loc = loc || this.currentLocation || {start:{}};
chunk = castChunk(chunk, this, loc);
- return new SourceNode(loc.firstLine, loc.firstColumn, this.srcFile, chunk);
+ return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
},
functionCall: function(fn, type, params) {