Skip to content

Commit

Permalink
🩹 Pass empty array to enqueue()'s $block when replacing with `acf…
Browse files Browse the repository at this point in the history
…:upgrade`
  • Loading branch information
Log1x committed Feb 26, 2024
1 parent 736cacc commit 8601499
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Console/UpgradeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function handle()
$this->replacements = [
'use StoutLogic\\AcfBuilder\\FieldsBuilder;' => 'use Log1x\\AcfComposer\\Builder;',
'new FieldsBuilder(' => 'Builder::make(',
'public function enqueue()' => 'public function enqueue($block)',
'public function enqueue()' => 'public function enqueue($block = [])',
'/->addFields\(\$this->get\((.*?)\)\)/' => fn ($match) => "->addPartial({$match[1]})",
];

Expand Down

0 comments on commit 8601499

Please sign in to comment.