Add some error checking for an invalid template path

This commit is contained in:
Patrick Steele-Idem 2014-10-22 11:10:58 -06:00
parent d60a21b40d
commit 2ad817a20d

View File

@ -76,7 +76,7 @@ Template.prototype = {
out = new AsyncWriter(out);
shouldEnd = true;
}
out.on('finish', function() {
callback(null, out.getOutput());
});
@ -155,6 +155,10 @@ if (stream) {
}
function load(templatePath) {
if (!templatePath) {
throw new Error('"templatePath" is required');
}
var template;
if (typeof templatePath === 'string') {