File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 64
64
}
65
65
66
66
function reactivateSearch ( e ) {
67
- var navigationType = ( window . performance . navigation || { } ) . type
68
- if ( navigationType && navigationType !== FORWARD_BACK_TYPE ) return
69
- if ( e . persisted && ! isClosed ( this ) ) {
70
- this . $input . focus ( )
71
- this . $input . val ( this . getVal ( ) )
72
- } else if ( window . sessionStorage . getItem ( 'docs:restore-search-on-back' ) === 'true' ) {
73
- restoreSearch . call ( this )
67
+ var navigation = window . performance . navigation || { }
68
+ if ( 'type' in navigation ) {
69
+ if ( navigation . type !== FORWARD_BACK_TYPE ) {
70
+ return
71
+ } else if ( e . persisted && ! isClosed ( this ) ) {
72
+ this . $input . focus ( )
73
+ this . $input . val ( this . getVal ( ) )
74
+ } else if ( window . sessionStorage . getItem ( 'docs:restore-search-on-back' ) === 'true' ) {
75
+ restoreSearch . call ( this )
76
+ }
74
77
}
75
78
window . sessionStorage . removeItem ( 'docs:restore-search-on-back' )
76
79
}
You can’t perform that action at this time.
0 commit comments