diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index fed256e9..1b18d9a8 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -42,9 +42,8 @@ class GithubAPI { ); return response.data; } on Exception { - // ignore + return null; } - return null; } Future> getCommits( @@ -70,9 +69,8 @@ class GithubAPI { (commit['commit']['message'] as String).split('\n')[0]) .toList(); } on Exception { - // ignore + return List.empty(); } - return List.empty(); } Future getLatestReleaseFile(String extension, String repoName) async { @@ -104,7 +102,7 @@ class GithubAPI { patches = list.map((patch) => Patch.fromJson(patch)).toList(); } } on Exception { - // ignore + return List.empty(); } return patches; } diff --git a/lib/services/revanced_api.dart b/lib/services/revanced_api.dart index bc672ca3..09d1e4c8 100644 --- a/lib/services/revanced_api.dart +++ b/lib/services/revanced_api.dart @@ -38,7 +38,7 @@ class RevancedAPI { contributors[name] = repo['contributors']; } } on Exception { - // ignore + return {}; } return contributors; } @@ -49,9 +49,8 @@ class RevancedAPI { List patches = response.data; return patches.map((patch) => Patch.fromJson(patch)).toList(); } on Exception { - // ignore + return List.empty(); } - return List.empty(); } Future?> _getLatestRelease(