Skip to content

Commit daeb86e

Browse files
committed
Merge pull request #1380 from saper/emptysourcesContent
Don't emit sourcesContent if empty
2 parents 02aa085 + 57f88e5 commit daeb86e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/source_map.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ namespace Sass {
5050
JsonNode *json_content = json_mkstring(content);
5151
json_append_element(json_contents, json_content);
5252
}
53+
if (json_contents->children.head)
54+
json_append_member(json_srcmap, "sourcesContent", json_contents);
5355
}
54-
json_append_member(json_srcmap, "sourcesContent", json_contents);
5556

5657
string mappings = serialize_mappings();
5758
JsonNode *json_mappings = json_mkstring(mappings.c_str());

0 commit comments

Comments
 (0)