Editor: Ensure block script is enqueued, regardless of ronder_callback.

Follow-up to [54155].

Props aristath, cbravobernal.
See #56408.

git-svn-id: https://develop.svn.wordpress.org/trunk@54367 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
David Baumwald
2022-10-03 14:39:05 +00:00
parent 389a78ecc4
commit ad101b1e03

View File

@@ -266,7 +266,7 @@ class WP_Block {
}
}
if ( ! empty( $this->block_type->view_script_handles ) && empty( $this->block_type->render_callback ) ) {
if ( ! empty( $this->block_type->view_script_handles ) ) {
foreach ( $this->block_type->view_script_handles as $view_script_handle ) {
wp_enqueue_script( $view_script_handle );
}