Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check for a valid path before guessing the proper URL.

  • Loading branch information...
commit 4933ef335ec2157a75dc657274c8ab4806c403fe 1 parent eba4e40
@brianantonelli brianantonelli authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 js/jquery.mobile.router.js
View
7 js/jquery.mobile.router.js
@@ -74,6 +74,9 @@ $(document).bind("mobileinit",function(){
if (config.fixFirstPageDataUrl){
$(document).ready(function(){
+ if (!window.location.pathname.match("/$")){
+ return;
+ }
var page=$(":jqmData(role='page')").first();
var dataUrl=page.jqmData("url"),
guessedDataUrl=window.location.pathname
@@ -81,9 +84,7 @@ $(document).bind("mobileinit",function(){
+window.location.search
+window.location.hash
;
- if (!window.location.pathname.match("/$")){
- return;
- }
+
if (dataUrl!=guessedDataUrl){
page.attr("data-url",guessedDataUrl)
.jqmData("url",guessedDataUrl);
Please sign in to comment.
Something went wrong with that request. Please try again.