Skip to content

Commit

Permalink
fix invalid json on an empty categories list (#2550)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcollins-g committed Mar 1, 2021
1 parent f8d62e0 commit fbb3664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/generator/dartdoc_generator_backend.dart
Expand Up @@ -86,7 +86,7 @@ abstract class DartdocGeneratorBackend implements GeneratorBackend {
@override
void generateCategoryJson(
FileWriter writer, List<Categorization> categories) {
var json = '';
var json = '[]';
if (categories.isNotEmpty) {
json = generator_util.generateCategoryJson(
categories, options.prettyIndexJson);
Expand Down

0 comments on commit fbb3664

Please sign in to comment.