Skip to content

Commit

Permalink
fix remote js (is admin)
Browse files Browse the repository at this point in the history
  • Loading branch information
yarovikov committed Jul 15, 2024
1 parent 1d061d4 commit fdd6d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Editor/AbstractBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function enqueueAssets(array $blocks, array $assets): void
if ($this->name === $block['blockName']) {
array_map(function (array $asset) use ($block): void {
if (empty($asset['condition']) || (is_callable($asset['condition']) && $asset['condition']($block))) {
if (!empty($asset['dependencies'])) {
if (!empty($asset['dependencies']) && false === is_admin()) {
bundle($asset['handle'])->enqueueJs(true, $asset['dependencies']);
} else {
bundle($asset['handle'])->enqueue();
Expand Down

0 comments on commit fdd6d32

Please sign in to comment.