mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
fix path must receive string in node 6+
This commit is contained in:
parent
91f2dc354d
commit
71a1fc71ba
@ -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);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user