From cd6a017b6687ec750c85a60fd9d0b1f2d5e8b16a Mon Sep 17 00:00:00 2001 From: Aaron Jorbin Date: Wed, 3 Aug 2016 22:27:51 +0000 Subject: [PATCH] Updates: Clean up debug statements. Removing some `console.error` calls leftover from development and wrapping the `console.log` call in a check to ensure `console.log` exists. Fixes #37514. Props ocean90, obenland git-svn-id: https://develop.svn.wordpress.org/trunk@38186 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/updates.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index f327c003be..21eebf745b 100644 --- a/src/wp-admin/js/updates.js +++ b/src/wp-admin/js/updates.js @@ -249,7 +249,7 @@ wp.updates.queueChecker(); } - if ( 'undefined' !== typeof response.debug ) { + if ( 'undefined' !== typeof response.debug && window.console && window.console.log ) { _.map( response.debug, function( message ) { window.console.log( $( '

' ).html( message ).text() ); } ); @@ -1349,7 +1349,6 @@ break; default: - window.console.error( 'Failed to execute queued update job.', job ); break; } }; @@ -1938,7 +1937,6 @@ break; default: - window.console.error( 'The page "%s" is not white-listed for bulk action handling.', pagenow ); return; } @@ -1970,7 +1968,6 @@ break; default: - window.console.error( 'Failed to identify bulk action: %s', bulkAction ); return; }