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

Commit

Permalink
Fix Mini-Cart block check to see whether a script has already been en…
Browse files Browse the repository at this point in the history
…queued (#9649)
  • Loading branch information
Aljullu committed May 30, 2023
1 parent 475dcfc commit 0346598
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BlockTypes/MiniCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ protected function append_script_and_deps_src( $script ) {
$wp_scripts = wp_scripts();

// This script and its dependencies have already been appended.
if ( ! $script || array_key_exists( $script->handle, $this->scripts_to_lazy_load ) || wp_script_is( $script->handle, 'enqueued' ) ) {
if ( ! $script || array_key_exists( $script->handle, $this->scripts_to_lazy_load ) || isset( $wp_scripts->queue[ $script->handle ] ) ) {
return;
}

Expand Down

0 comments on commit 0346598

Please sign in to comment.