Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
fix: update for webpack 4
Browse files Browse the repository at this point in the history
this.options is not available in webpack4 so we check and return
an empty object instead.
  • Loading branch information
Markus Wolf committed Mar 1, 2018
1 parent 39046c0 commit 0a4fa37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var loaderUtils = require('loader-utils');
module.exports = function(source) {
this.cacheable && this.cacheable();
var query = loaderUtils.parseQuery(this.query);
var options = this.options.ejsLoader || {};
var options = this.options ? this.options.ejsLoader || {} : {};

['escape', 'interpolate', 'evaluate'].forEach(function(templateSetting) {
var setting = query[templateSetting];
Expand Down

0 comments on commit 0a4fa37

Please sign in to comment.