Skip to content

Commit

Permalink
Fix for null tag string
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Jul 26, 2023
1 parent cf862b7 commit 6e81d10
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ Future<Map<DictionaryHeading, List<DictionaryEntry>>>
String reading = item[1] as String;

double popularity = (item[4] as num).toDouble();
List<String> entryTagNames = (item[2] as String).split(' ');

// Third entry in array can be null
List<String> entryTagNames = [];
if (item[2] != null) {
entryTagNames = (item[2] as String).split(' ');
}

List<String> headingTagNames = (item[7] as String).split(' ');

List<String> definitions = [];
Expand Down

0 comments on commit 6e81d10

Please sign in to comment.