fix: return null

This commit is contained in:
Simon Ding
2024-11-01 22:05:06 +08:00
parent 0b1bd8226d
commit 8ce7045466
2 changed files with 8 additions and 4 deletions

View File

@@ -131,7 +131,7 @@ class APIs {
if (sp.code != 0) {
throw sp.message;
}
return sp.data as List<String>;
return sp.data==null? []:sp.data as List<String>;
}
static Future<List<String>> downloadAllMovies() async {
@@ -142,7 +142,7 @@ class APIs {
if (sp.code != 0) {
throw sp.message;
}
return sp.data as List<String>;
return sp.data==null? []:sp.data as List<String>;
}
static Future<String> parseTvName(String s) async {