]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/js/updates.js
WordPress 4.1
[autoinstalls/wordpress.git] / wp-admin / js / updates.js
index 3139c3ef241e54f6478f89d95678c4e980d72a5e..b03e4ba8f01e44a8dd89d8f06ffc79acd427b9fd 100644 (file)
@@ -15,7 +15,7 @@ window.wp = window.wp || {};
                $elem = $( '#wp-admin-bar-updates .ab-label' );
                count = $elem.text();
                count = parseInt( count, 10 ) - 1;
-               if ( count < 0 ) {
+               if ( count < 0 || isNaN( count ) ) {
                        return;
                }
                $( '#wp-admin-bar-updates .ab-item' ).removeAttr( 'title' );
@@ -32,7 +32,7 @@ window.wp = window.wp || {};
                        $elem = $( '#menu-plugins' );
                        pluginCount = $elem.find( '.plugin-count' ).eq(0).text();
                        pluginCount = parseInt( pluginCount, 10 ) - 1;
-                       if ( pluginCount < 0 ) {
+                       if ( pluginCount < 0 || isNaN( pluginCount ) ) {
                                return;
                        }
                        $elem.find( '.plugin-count' ).text( pluginCount );