From aa8d701f76fc5dbe4a02634ab0eba281de4be626 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Tue, 13 Jan 2015 14:33:36 -0800 Subject: [PATCH] Catch undefined --- tools/compiler.js | 5 +++++ 1 file changed, 5 insertions(+) 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);