Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

UrlbarSuggestions does not work if you are offline #4821

Merged
merged 1 commit into from
Oct 18, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions js/components/urlBarSuggestions.js
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,11 @@ class UrlBarSuggestions extends ImmutableComponent {
windowActions.setUrlBarSuggestionSearchResults(Immutable.fromJS(xhr.response[1]))
this.updateSuggestions(props.selectedIndex)
}

xhr.onerror = () => {
windowActions.setUrlBarSuggestionSearchResults(Immutable.fromJS([]))
this.updateSuggestions(props.selectedIndex)
}
} else {
windowActions.setUrlBarSuggestionSearchResults(Immutable.fromJS([]))
this.updateSuggestions(props.selectedIndex)
Expand Down