Skip to content

Commit

Permalink
Merge pull request #290 from iKoala/master
Browse files Browse the repository at this point in the history
Avoid loading partial files when partial value is undefined/null/false
  • Loading branch information
doowb committed Sep 19, 2017
2 parents c9a94a5 + 08b3fac commit d0ee1ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/consolidate.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ function readPartials(path, options, fn) {
var key = keys[index];
var partialPath = partials[key];

if (partialPath === undefined || partialPath === null || partialPath === false) {
return next(++index);
}

var file;
if (isAbsolute(partialPath)) {
if (extname(partialPath) !== '') {
Expand Down

0 comments on commit d0ee1ec

Please sign in to comment.