From ecaeae58541a82c3cc29d4598ab1352e2cfa724c Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Tue, 18 Dec 2012 15:02:53 +0200 Subject: [PATCH] Navigation: loadPage: When loading a blank page, do not end up with
undefined
--- js/jquery.mobile.navigation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/jquery.mobile.navigation.js b/js/jquery.mobile.navigation.js index 6d6d7482957..10f367c07fc 100644 --- a/js/jquery.mobile.navigation.js +++ b/js/jquery.mobile.navigation.js @@ -499,7 +499,7 @@ define( [ //if page elem couldn't be found, create one and insert the body element's contents if ( !page.length ) { - page = $( "
" + html.split( /<\/?body[^>]*>/gmi )[1] + "
" ); + page = $( "
" + ( html.split( /<\/?body[^>]*>/gmi )[1] || "" ) + "
" ); } if ( newPageTitle && !page.jqmData( "title" ) ) {