Skip to content

Commit

Permalink
Fix error when FDU server is under maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
w568w committed May 1, 2021
1 parent 8fac578 commit c5948b9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/feature/aao_notice_feature.dart
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,12 @@ class FudanAAONoticesFeature extends Feature {
case ConnectionStatus.CONNECTING:
return S.of(context).loading;
case ConnectionStatus.DONE:
return _initialData.first.title;
return '';
if (_initialData != null) {
return _initialData.length > 0 ? _initialData.first?.title : null;
} else {
return null;
}
break;
case ConnectionStatus.FAILED:
case ConnectionStatus.FATAL_ERROR:
return S.of(context).failed;
Expand Down

0 comments on commit c5948b9

Please sign in to comment.