Skip to content

Commit fa67afe

Browse files
author
hextraza
committed
Fix console error on submit with no input
1 parent 7229b51 commit fa67afe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jbrowse/src/client/JBrowse/Browser/RefNameAutocompleteWrapper.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ import BaseResult, { RefSequenceResult }from '@jbrowse/core/TextSearch/BaseResul
77

88
const RefNameAutocompleteWrapper = observer(({ viewState, sessionParam }: { viewState: ViewModel, sessionParam: any}) => {
99
function navigate() {
10-
window.location.href = location.pathname.split('/').slice(0,-1).join('/') + '/jbrowse-jbrowse.view?session=' + sessionParam + '&location=' + op.getLocation()
10+
if (op) {
11+
window.location.href = location.pathname.split('/').slice(0,-1).join('/') + '/jbrowse-jbrowse.view?session=' + sessionParam + '&location=' + op.getLocation()
12+
}
1113
}
1214

1315
const { session } = viewState

0 commit comments

Comments
 (0)