(Hot) Fix Aggregate Converter loop

This commit is contained in:
Kacper Donat 2020-05-03 00:03:54 +02:00
parent ab9e1b5b99
commit 7db9517840

View File

@ -47,8 +47,10 @@ class AggregateConverter implements Converter, CacheableConverter
public function flushCache()
{
$this->ensureCachedConverters();
$this
->converters
->cachedConverters
->filter(instance(CacheableConverter::class))
->each(function (CacheableConverter $converter) {
$converter->flushCache();
@ -70,7 +72,7 @@ class AggregateConverter implements Converter, CacheableConverter
if (!$this->cachedConverters) {
$this->cachedConverters = collect($this->converters)
->filter(function (Converter $converter) {
return $converter !== $this;
return $converter !== $this && !$converter instanceof AggregateConverter;
})
->each(function (Converter $converter) {
if ($converter instanceof RecursiveConverter) {