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

Commit 3c53106

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
Conflicts: js/jquery.mobile.navigation.js
1 parent 9ac46ef commit 3c53106

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/jquery.mobile.navigation.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ define( [
499499
};
500500
}
501501
// Reset base to the default document base.
502-
// only reset if we are not prefetching
503-
if ( base && typeof options.prefetch === "undefined" ) {
502+
// only reset if we are not prefetching
503+
if ( base && ( typeof options === "undefined" || typeof options.prefetch === "undefined" ) ) {
504504
base.reset();
505505
}
506506

@@ -536,7 +536,7 @@ define( [
536536
url = fileUrl = path.getFilePath( $( "<div>" + RegExp.$1 + "</div>" ).text() );
537537
}
538538
//dont update the base tag if we are prefetching
539-
if ( base && typeof options.prefetch === "undefined") {
539+
if ( base && ( typeof options === "undefined" || typeof options.prefetch === "undefined" )) {
540540
base.set( fileUrl );
541541
}
542542

0 commit comments

Comments
 (0)