Guard against not having an input sourcemap.

This commit is contained in:
Andy Wood 2014-05-13 08:03:55 +01:00
parent b2e9d5a02d
commit 714bcc0711

View File

@ -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]);