Script Loader: Fix metadata being registered as an inline script.

[43723] included script metadata for the `wp-polyfill` script that was being registered as an inline script.

See #45065.



git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43802 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2018-10-23 06:20:23 +00:00
parent ff39bf3d68
commit cf0f8e82b5

View File

@ -102,7 +102,7 @@ function wp_default_packages_vendor( &$scripts ) {
} }
$scripts->add( 'wp-polyfill', null, array( 'wp-polyfill-ecmascript' ) ); $scripts->add( 'wp-polyfill', null, array( 'wp-polyfill-ecmascript' ) );
did_action( 'init' ) && $scripts->add_inline_script( did_action( 'init' ) && $scripts->add_data(
'wp-polyfill', 'wp-polyfill',
'data', 'data',
wp_get_script_polyfill( wp_get_script_polyfill(