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

Conflicts:
	js/jquery.mobile.navigation.js
  • Loading branch information
arschmitz committed May 6, 2013
1 parent 9ac46ef commit 3c53106
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/jquery.mobile.navigation.js
Expand Up @@ -499,8 +499,8 @@ define( [
};
}
// Reset base to the default document base.
// only reset if we are not prefetching
if ( base && typeof options.prefetch === "undefined" ) {
// only reset if we are not prefetching
if ( base && ( typeof options === "undefined" || typeof options.prefetch === "undefined" ) ) {
base.reset();
}

Expand Down Expand Up @@ -536,7 +536,7 @@ define( [
url = fileUrl = path.getFilePath( $( "<div>" + RegExp.$1 + "</div>" ).text() );
}
//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 3c53106

Please sign in to comment.