Fix some places where a null could sneak into a boolean condition

This commit is contained in:
Natalie Weizenbaum 2019-05-08 17:19:12 -07:00
parent a950b2daaa
commit 3b47e34c87

View File

@ -350,11 +350,11 @@ RenderResult _newRenderResult(
}
var json = result.sourceMap
.toJson(includeSourceContents: options.sourceMapContents);
.toJson(includeSourceContents: isTruthy(options.sourceMapContents));
sourceMapBytes = utf8Encode(jsonEncode(json));
if (!isTruthy(options.omitSourceMapUrl)) {
var url = options.sourceMapEmbed
var url = isTruthy(options.sourceMapEmbed)
? Uri.dataFromBytes(sourceMapBytes, mimeType: "application/json")
: p.toUri(options.outFile == null
? sourceMapPath