From 4619ee7b17928cdc33a08608783132cc56081e28 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Thu, 7 Dec 2017 16:09:33 +0300 Subject: [PATCH] fix: `undefined` when source map undefined --- 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" +