Skip to content

Commit

Permalink
fix(loader): correctly check if source map is undefined (#641)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored and michael-ciniawsky committed Jan 4, 2018
1 parent d999f4a commit 0dccfa9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/loader.js
Expand Up @@ -110,7 +110,7 @@ module.exports = function(content, map) {
}

var moduleJs;
if(query.sourceMap && result.map) {
if(sourceMap && result.map) {
// add a SourceMap
map = result.map;
if(map.sources) {
Expand All @@ -129,7 +129,7 @@ module.exports = function(content, map) {
// embed runtime
callback(null, "exports = module.exports = require(" +
loaderUtils.stringifyRequest(this, require.resolve("./css-base.js")) +
")(" + query.sourceMap + ");\n" +
")(" + sourceMap + ");\n" +
"// imports\n" +
importJs + "\n\n" +
"// module\n" +
Expand Down

0 comments on commit 0dccfa9

Please sign in to comment.