diff --git a/src/wp-includes/blocks.php b/src/wp-includes/blocks.php index 98c437cae6..54cf71ae74 100644 --- a/src/wp-includes/blocks.php +++ b/src/wp-includes/blocks.php @@ -78,12 +78,7 @@ function register_block_script_handle( $metadata, $field_name ) { return $script_handle; } - $script_handle = generate_block_asset_handle( $metadata['name'], $field_name ); - - if ( 'viewScript' === $field_name ) { - $script_path = str_replace( '.min.js', '.js', $script_path ); - } - + $script_handle = generate_block_asset_handle( $metadata['name'], $field_name ); $script_asset_path = realpath( dirname( $metadata['file'] ) . '/' . substr_replace( $script_path, '.asset.php', - strlen( '.js' ) )