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

Commit

Permalink
Prefetch: Check for existance of options object before checking prefe…
Browse files Browse the repository at this point in the history
…tch property Fixes #5877 - loadPage Cannot read property 'prefetch' of undefined and addresses execption from #5951
  • Loading branch information
arschmitz committed May 1, 2013
1 parent 6ef1b85 commit 9648130
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/jquery.mobile.navigation.js
Expand Up @@ -525,7 +525,7 @@ define( [
}
// Reset base to the default document base.
// only reset if we are not prefetching
if ( base && typeof options.prefetch === "undefined" ) {
if ( base && ( typeof options === "undefined" || typeof options.prefetch === "undefined" ) ) {
base.reset();
}

Expand Down Expand Up @@ -562,7 +562,7 @@ define( [
}

//dont update the base tag if we are prefetching
if ( base && typeof options.prefetch === "undefined") {
if ( base && ( typeof options === "undefined" || typeof options.prefetch === "undefined" )) {
base.set( fileUrl );
}

Expand Down

0 comments on commit 9648130

Please sign in to comment.