Fix meaning-tag IndexError bug
This commit is contained in:
parent
0941a2f4d1
commit
cf70eea0a1
|
@ -159,11 +159,12 @@ PhrasePageScrapeResultData _getMeaningsOtherFormsAndNotes(
|
|||
var notes;
|
||||
|
||||
for (var child in meaningsWrapper.children) {
|
||||
final mostRecentWordType = mostRecentWordTypes.length >= 1 ? mostRecentWordTypes[0] : null;
|
||||
if (child.className.contains('meaning-tags')) {
|
||||
mostRecentWordTypes = _getMostRecentWordTypes(child);
|
||||
} else if (mostRecentWordTypes[0] == 'other forms') {
|
||||
} else if (mostRecentWordType == 'other forms') {
|
||||
otherForms = _getOtherForms(child);
|
||||
} else if (mostRecentWordTypes[0] == 'notes') {
|
||||
} else if (mostRecentWordType == 'notes') {
|
||||
notes = _getNotes(child);
|
||||
} else {
|
||||
meanings.add(_getMeaning(child));
|
||||
|
|
Loading…
Reference in New Issue