From 0dccfa90b4962be57dc8227ef9ace61bc6bbe0b2 Mon Sep 17 00:00:00 2001 From: Evilebot Tnawi Date: Thu, 4 Jan 2018 22:24:53 +0300 Subject: [PATCH] fix(loader): correctly check if source map is `undefined` (#641) --- lib/loader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/loader.js b/lib/loader.js index cb8ff307..d583a8b1 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -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) { @@ -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" +