Skip to content

Commit 633b5fb

Browse files
committed
fix(includer): fix handling includer option
1 parent b525a77 commit 633b5fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ejs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ function includeFile(path, options) {
313313
if (includerResult.filename) {
314314
opts.filename = includerResult.filename;
315315
}
316-
return handleCache(opts, includerResult.template);
316+
if (includerResult.template) {
317+
return handleCache(opts, includerResult.template);
318+
}
317319
}
318320
}
319321
return handleCache(opts);
@@ -524,6 +526,7 @@ function Template(text, opts) {
524526
options.cache = opts.cache || false;
525527
options.rmWhitespace = opts.rmWhitespace;
526528
options.root = opts.root;
529+
options.includer = opts.includer;
527530
options.outputFunctionName = opts.outputFunctionName;
528531
options.localsName = opts.localsName || exports.localsName || _DEFAULT_LOCALS_NAME;
529532
options.views = opts.views;

0 commit comments

Comments
 (0)