Skip to content

Commit

Permalink
Properly trim .min.js and .js
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Sep 19, 2024
1 parent 079cf23 commit 1f47642
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,9 @@ function gutenberg_default_script_modules() {
$assets = include gutenberg_dir_path() . '/build-module/assets.php';

foreach ( $assets as $file_name => $script_module_data ) {
$package_name = dirname( $file_name );
$package_sub_name = basename( $file_name, '.min.js' );
$package_name = dirname( $file_name );
// Account for both `[filename].min.js` and `[filename].js`
$package_sub_name = basename( basename( $file_name, '.js' ), '.min' );

switch ( $package_name ) {
/*
Expand Down

0 comments on commit 1f47642

Please sign in to comment.