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