Fix null check error for GitHub repos w/o releases

This commit is contained in:
Imran Remtulla
2023-07-17 15:57:10 -04:00
parent e093fc28b0
commit 04b49c2e61

View File

@@ -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));
}
}
});