Skip to content

Commit

Permalink
fix incompatibility issue with json-wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
milewski committed Feb 24, 2021
1 parent b24d65b commit 29ec359
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/HasConditionalContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace DigitalCreative\ConditionalContainer;

use DigitalCreative\JsonWrapper\JsonWrapper;
use Illuminate\Http\Resources\MergeValue;
use Illuminate\Support\Collection;
use Laravel\Nova\Contracts\RelatableField;
Expand Down Expand Up @@ -261,6 +262,12 @@ private function flattenDependencies(NovaRequest $request, array $fields)

}

if ($field instanceof JsonWrapper) {

return $this->flattenDependencies($fakeRequest, $field->fields);

}

return [ $field ];

});
Expand Down Expand Up @@ -322,6 +329,12 @@ private function findAllContainers($fields): Collection

}

if ($field instanceof JsonWrapper) {

return $this->findAllContainers($field->fields);

}

})
->filter()
/**
Expand Down

0 comments on commit 29ec359

Please sign in to comment.