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

Commit 9648130

Browse files
committed
Prefetch: Check for existance of options object before checking prefetch property Fixes #5877 - loadPage Cannot read property 'prefetch' of undefined and addresses execption from #5951
1 parent 6ef1b85 commit 9648130

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/jquery.mobile.navigation.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ define( [
525525
}
526526
// Reset base to the default document base.
527527
// only reset if we are not prefetching
528-
if ( base && typeof options.prefetch === "undefined" ) {
528+
if ( base && ( typeof options === "undefined" || typeof options.prefetch === "undefined" ) ) {
529529
base.reset();
530530
}
531531

@@ -562,7 +562,7 @@ define( [
562562
}
563563

564564
//dont update the base tag if we are prefetching
565-
if ( base && typeof options.prefetch === "undefined") {
565+
if ( base && ( typeof options === "undefined" || typeof options.prefetch === "undefined" )) {
566566
base.set( fileUrl );
567567
}
568568

0 commit comments

Comments
 (0)