From 04b49c2e613a6a14cc5acac3845b8063845bccea Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Mon, 17 Jul 2023 15:57:10 -0400 Subject: [PATCH] Fix null check error for GitHub repos w/o releases --- lib/app_sources/github.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/app_sources/github.dart b/lib/app_sources/github.dart index 8cb08e2..4334abd 100644 --- a/lib/app_sources/github.dart +++ b/lib/app_sources/github.dart @@ -211,8 +211,8 @@ class GitHub extends AppSource { (nameA as String).substring(matchA!.start, matchA.end), (nameB as String).substring(matchB!.start, matchB.end)); } else { - return getReleaseDateFromRelease(a)! - .compareTo(getReleaseDateFromRelease(b)!); + return (getReleaseDateFromRelease(a) ?? DateTime(1)) + .compareTo(getReleaseDateFromRelease(b) ?? DateTime(0)); } } });