Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Navigation: loadPage: When loading a blank page, do not end up with <…
Browse files Browse the repository at this point in the history
…div data-role="page">undefined</div>
  • Loading branch information
Gabriel Schulhof committed Dec 18, 2012
1 parent a00dd8b commit ecaeae5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/jquery.mobile.navigation.js
Expand Up @@ -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" ) ) {
Expand Down

0 comments on commit ecaeae5

Please sign in to comment.