Upgrade/Install: Prevent possible JavaScript error when updating translations.

Props Presskopp.
Fixes #39189.


git-svn-id: https://develop.svn.wordpress.org/trunk@44513 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2019-01-09 11:25:19 +00:00
parent 916695bd78
commit e4e9010207

View File

@ -191,7 +191,7 @@ class WP_Upgrader_Skin {
} else {
echo '<script type="text/javascript">
(function( wp ) {
if ( wp && wp.updates.decrementCount ) {
if ( wp && wp.updates && wp.updates.decrementCount )
wp.updates.decrementCount( "' . $type . '" );
}
})( window.wp );