Skip to content

Commit

Permalink
available workaround used with include
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlike Mike Reagent authored Oct 19, 2019
1 parent 20fde51 commit cd3eb54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ module.exports = function plugin(app) {
*/

app.asyncHelper('ifExists', function(files, val, cb) {
val = typeof val === 'function' ? val() : val;

cb(null, utils.anyExists(files, this.app.cwd) ? val : '');
});

Expand Down

0 comments on commit cd3eb54

Please sign in to comment.