From 714bcc0711195f84818fb44b71e084669fb8231d Mon Sep 17 00:00:00 2001 From: Andy Wood Date: Tue, 13 May 2014 08:03:55 +0100 Subject: [PATCH] Guard against not having an input sourcemap. --- lib/sourcemap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sourcemap.js b/lib/sourcemap.js index 403b4f4d..6e98e547 100644 --- a/lib/sourcemap.js +++ b/lib/sourcemap.js @@ -60,7 +60,7 @@ function SourceMap(options) { var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); // Copy across inline sourcesContent, if any - if (options.orig.sourcesContent) { + if (options.orig && options.orig.sourcesContent) { var len = options.orig.sourcesContent.length; for (var i = 0; i < len; i++) { generator.setSourceContent(options.orig.sources[i], options.orig.sourcesContent[i]);