minor refactor and check for defined attr

This commit is contained in:
John Bender 2011-08-27 00:57:52 -07:00
parent 6b010492b2
commit 76d5c49b78

View file

@ -35,11 +35,13 @@
},
isSubHashPage: function( page ) {
var pageUrl = page.jqmData("url") || "";
// if the page is a dialog, a subpage, or an embedded page
// then the hash will have been maintained
return page.is( "[role='dialog']" ) ||
page.jqmData("url").indexOf( $.mobile.subPageUrlKey ) >= 0 ||
page.jqmData("url") == page.attr( "id" );
pageUrl.indexOf( $.mobile.subPageUrlKey ) >= 0 ||
pageUrl === page.attr( "id" );
},
resetUIKeys: function( url ) {