when we receive intentional empty whats new info, do not try to show it
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
fe5bc6810c
commit
f4abee5209
|
@ -53,7 +53,11 @@ class ChangesCheck {
|
|||
public function getChangesForVersion(string $version): array {
|
||||
$version = $this->normalizeVersion($version);
|
||||
$changesInfo = $this->mapper->getChanges($version);
|
||||
return json_decode($changesInfo->getData(), true);
|
||||
$changesData = json_decode($changesInfo->getData(), true);
|
||||
if(empty($changesData)) {
|
||||
throw new DoesNotExistException();
|
||||
}
|
||||
return $changesData;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -279,6 +279,10 @@ class ChangesCheckTest extends TestCase {
|
|||
],
|
||||
]
|
||||
],
|
||||
[ # 4 - empty
|
||||
'',
|
||||
[]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue