From ba2bc6a8850bd2cced169485557506f65e6ffea6 Mon Sep 17 00:00:00 2001 From: rubenmoya Date: Fri, 15 Jun 2018 15:12:43 +0200 Subject: [PATCH] Add default value to options --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index ba18fca..492e50f 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ var _ = require('lodash'); module.exports = function (source) { this.cacheable && this.cacheable(); - var options = loaderUtils.getOptions(this); + var options = loaderUtils.getOptions(this) || {}; var template = _.template(source, null, options.tplSettings); return 'var _ = require(\'underscore\');\nmodule.exports = ' + template;