From 71a1fc71ba7dd5a1d5d00883be0ce38ea33619f0 Mon Sep 17 00:00:00 2001 From: Michael Rawlings Date: Tue, 28 Mar 2017 14:49:36 -0700 Subject: [PATCH] fix path must receive string in node 6+ --- runtime/loader/index-default.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/runtime/loader/index-default.js b/runtime/loader/index-default.js index c3d0f1575..b3c493fd0 100644 --- a/runtime/loader/index-default.js +++ b/runtime/loader/index-default.js @@ -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); }