Skip to content

Commit

Permalink
Fixed err when loaderUtils.getOptions return null
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinjiang authored May 21, 2018
1 parent d0b63f8 commit 4cd22ef
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 @@ -14,7 +14,7 @@ class BubleError extends Error {
}

module.exports = function(source) {
const config = loaderUtils.getOptions(this);
const config = loaderUtils.getOptions(this) || {};
config.transforms = Object.assign({}, config.transforms || {}, { modules: false });
let output;
try {
Expand Down

0 comments on commit 4cd22ef

Please sign in to comment.