Skip to content

Commit

Permalink
fix(template): throw when no way to deal with the template type
Browse files Browse the repository at this point in the history
  • Loading branch information
vvo committed Sep 15, 2015
1 parent 32ccd93 commit f5d151a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function renderTemplate(template, data) {
content = hogan.compile(template).render(data);
} else if (typeof template === 'function') {
content = template(data);
} else {
throw new Error('Template must be `string` or `function`');
}

return content;
Expand Down

0 comments on commit f5d151a

Please sign in to comment.