Permalink
Browse files

Prefetch: Check for existance of options object before checking prefe…

…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 964813032cb8247bef723aaa9ad5df80d7e7b644
Showing with 2 additions and 2 deletions.
  1. +2 −2 js/jquery.mobile.navigation.js
@@ -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();
}
@@ -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 );
}

0 comments on commit 9648130

Please sign in to comment.