fix path must receive string in node 6+

This commit is contained in:
Michael Rawlings 2017-03-28 14:49:36 -07:00
parent 91f2dc354d
commit 71a1fc71ba

View File

@ -9,9 +9,7 @@ var cwd = process.cwd();
var fsOptions = {encoding: 'utf8'};
module.exports = function load(templatePath, templateSrc, options) {
var ext = nodePath.extname(templatePath);
if (ext === '.js') {
if (typeof templatePath === 'string' && nodePath.extname(templatePath) === '.js') {
// assume compiled template
return require(templatePath);
}