diff --git a/tools/compiler.js b/tools/compiler.js index d483bf6f21..f54580bb25 100644 --- a/tools/compiler.js +++ b/tools/compiler.js @@ -325,6 +325,11 @@ var compileUnibuild = function (options) { }; var convertSourceMapPaths = function (sourcemap, f) { + if (! sourcemap) { + // Don't try to convert it if it doesn't exist + return sourcemap; + } + var srcmap = JSON.parse(sourcemap); srcmap.sources = _.map(srcmap.sources, f); return JSON.stringify(srcmap);