Permalink
Browse files

FIX: with _data undefined bug

  • Loading branch information...
1 parent 9492c2a commit 505330b434f76d390408704d2f7fd0529a7dd8bf @wulijian committed Mar 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/kTemplate.js
View
@@ -37,7 +37,7 @@ var resetAll = function () {
var compile = function (code, helperName) {
var fileName = path.basename(fileRealPath); //文件名
var tempCode = 'var ' + replaces[0] + '\n';
- tempCode += 'with(_data){\n'; //添加with支持,缩短取值路径
+ tempCode += 'with(_data||{}){\n'; //添加with支持,缩短取值路径
ss.init(function (original, generated) {
generated.line.skip(2);
});

0 comments on commit 505330b

Please sign in to comment.