diff --git a/src/Support/ClaimProbabilities.php b/src/Support/ClaimProbabilities.php index ba86639..69b3950 100644 --- a/src/Support/ClaimProbabilities.php +++ b/src/Support/ClaimProbabilities.php @@ -50,9 +50,9 @@ public static function getCacheKey(string $code): string /** * Get the probabilities for a code. */ - public static function getProbabilities(string $code): array + public static function getProbabilities(?string $code): array { - return Cache::get( + return empty($code) ? [] : Cache::get( static::getCacheKey($code), static::getProbabilitiesFromDB($code) );