From a6608f1461fd67cd9ec5c78946031c8b2111f95e Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Sun, 21 Sep 2025 12:28:02 -0400 Subject: [PATCH] Fix error in Vivo Store search when no result found (#2494) --- lib/app_sources/vivoappstore.dart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/app_sources/vivoappstore.dart b/lib/app_sources/vivoappstore.dart index 278ca3c..280a585 100644 --- a/lib/app_sources/vivoappstore.dart +++ b/lib/app_sources/vivoappstore.dart @@ -70,12 +70,14 @@ class VivoAppStore extends AppSource { throw NoReleasesError(); } Map> results = {}; - var resultsJson = json['data']['appSearchResponse']['value']; - for (var item in (resultsJson as List)) { - results['$appDetailUrl${item['id']}'] = [ - item['title_zh'].toString(), - item['developer'].toString(), - ]; + var resultsJson = json['data']['appSearchResponse']?['value']; + if (resultsJson != null) { + for (var item in (resultsJson as List)) { + results['$appDetailUrl${item['id']}'] = [ + item['title_zh'].toString(), + item['developer'].toString(), + ]; + } } return results; }