From c5948b9d47140f15303ae279c4d4e11387514ba8 Mon Sep 17 00:00:00 2001 From: w568w <1278297578@qq.com> Date: Sat, 1 May 2021 11:21:32 +0800 Subject: [PATCH] Fix error when FDU server is under maintenance --- lib/feature/aao_notice_feature.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/feature/aao_notice_feature.dart b/lib/feature/aao_notice_feature.dart index 8a7523ab..0888fd63 100644 --- a/lib/feature/aao_notice_feature.dart +++ b/lib/feature/aao_notice_feature.dart @@ -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;