Skip to content

Commit

Permalink
base: better error report
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Mar 28, 2014
1 parent c65e48c commit 1190833
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/xjst/compiler/base.js
Expand Up @@ -589,7 +589,8 @@ Compiler.prototype.transformTemplates = function transformTemplates(template) {

if (expr.arguments[0]) {
assert(expr.arguments[0].type === 'FunctionExpression' ||
expr.arguments[0].type === 'Literal');
expr.arguments[0].type === 'Literal',
'Only literal or function is allowed in template\'s body');
}

function isConst(val) {
Expand Down

0 comments on commit 1190833

Please sign in to comment.