Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Mini Cart: load wc-blocks-registry package at the load of the page in…
Browse files Browse the repository at this point in the history
…stead of lazy load it (#7813)
  • Loading branch information
gigitux authored Dec 1, 2022
1 parent d3a846a commit 91985f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BlockTypes/MiniCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected function get_block_type_script( $key = null ) {
$script = [
'handle' => 'wc-' . $this->block_name . '-block-frontend',
'path' => $this->asset_api->get_block_asset_build_path( $this->block_name . '-frontend' ),
'dependencies' => [],
'dependencies' => [ 'wc-blocks-registry' ],
];
return $key ? $script[ $key ] : $script;
}
Expand Down Expand Up @@ -273,7 +273,7 @@ protected function append_script_and_deps_src( $script ) {
}
}
}
if ( ! $script->src ) {
if ( ! $script->src || 'wc-blocks-registry' === $script->handle ) {
return;
}

Expand Down

0 comments on commit 91985f3

Please sign in to comment.