Skip to content

Commit

Permalink
Compat: Respect SCRIPT_DEBUG for minified suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Feb 14, 2020
1 parent ea9494f commit 1f502c1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ function gutenberg_add_url_polyfill( $scripts ) {
return;
}

$suffix = SCRIPT_DEBUG ? '' : '.min';

gutenberg_register_vendor_script(
$scripts,
'wp-polyfill-url',
'https://unpkg.com/core-js-url-browser@3.6.4/url.min.js',
'https://unpkg.com/core-js-url-browser@3.6.4/url' . $suffix . '.js',
array(),
'3.6.4'
);
Expand Down

0 comments on commit 1f502c1

Please sign in to comment.