mirror of
https://github.com/h7x4/unofficial_jisho_api_dart.git
synced 2025-07-07 21:12:47 +02:00
Fix meaning-tag IndexError bug
This commit is contained in:
@ -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));
|
||||||
|
Reference in New Issue
Block a user