Fixed generating empty difference snapshots
This commit is contained in:
parent
2f12ec0a5e
commit
40d1276c36
1 changed files with 2 additions and 3 deletions
|
@ -43,11 +43,10 @@ class HistoryService
|
||||||
if ($otherSnapshots)
|
if ($otherSnapshots)
|
||||||
{
|
{
|
||||||
$lastSnapshot = array_shift($otherSnapshots);
|
$lastSnapshot = array_shift($otherSnapshots);
|
||||||
if (md5(json_encode($lastSnapshot->getData())) === md5(json_encode($snapshot->getData())))
|
|
||||||
return $lastSnapshot;
|
|
||||||
|
|
||||||
$dataDifference = $this->getSnapshotDataDifference($snapshot->getData(), $lastSnapshot->getData());
|
$dataDifference = $this->getSnapshotDataDifference($snapshot->getData(), $lastSnapshot->getData());
|
||||||
$snapshot->setDataDifference($dataDifference);
|
$snapshot->setDataDifference($dataDifference);
|
||||||
|
if (empty($dataDifference['+']) && empty($dataDifference['-']))
|
||||||
|
return $lastSnapshot;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue