Permalink
Browse files

Navigation: loadPage: When loading a blank page, do not end up with <…

…div data-role="page">undefined</div>
  • Loading branch information...
1 parent a00dd8b commit ecaeae58541a82c3cc29d4598ab1352e2cfa724c @gabrielschulhof gabrielschulhof committed Dec 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 = $( "<div data-" + $.mobile.ns + "role='page'>" + html.split( /<\/?body[^>]*>/gmi )[1] + "</div>" );
+ page = $( "<div data-" + $.mobile.ns + "role='page'>" + ( html.split( /<\/?body[^>]*>/gmi )[1] || "" ) + "</div>" );
}
if ( newPageTitle && !page.jqmData( "title" ) ) {

0 comments on commit ecaeae5

Please sign in to comment.