Fix JS error in autocomplete. props koopersmith, see #13205.

git-svn-id: https://develop.svn.wordpress.org/trunk@14405 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2010-05-03 20:31:34 +00:00
parent d783952469
commit 60ae097b78
1 changed files with 2 additions and 2 deletions

View File

@ -262,7 +262,7 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
's' => $query,
));
if ( ! have_posts() )
echo '-1';
return;
while ( have_posts() ) {
the_post();
if ( 'markup' == $response_format ) {
@ -284,7 +284,7 @@ function _wp_ajax_menu_quick_search( $request = array() ) {
'number' => 10,
));
if ( empty( $terms ) || is_wp_error( $terms ) )
echo '-1';
return;
foreach( (array) $terms as $term ) {
if ( 'markup' == $response_format ) {
echo walk_nav_menu_tree( array_map('wp_setup_nav_menu_item', array( $term ) ), 0, (object) $args );