Skip to content

Commit

Permalink
Fix wrong crops for Blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrckvzn authored and ifox committed Oct 14, 2024
1 parent 12ff193 commit ed890eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Commands/RefreshCrops.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,10 @@ public function handle()

$this->roleName = $this->argument('roleName');

$mediasParams = app($this->modelName)->getMediasParams();
if (empty($mediasParams)) {
if (app($this->modelName) instanceof \A17\Twill\Models\Block) {
$mediasParams = TwillBlocks::getAllCropConfigs();
} else {
$mediasParams = app($this->modelName)->getMediasParams();
}

if (! isset($mediasParams[$this->roleName])) {
Expand Down

0 comments on commit ed890eb

Please sign in to comment.