diff --git a/browser/components/urlbar/UrlbarController.jsm b/browser/components/urlbar/UrlbarController.jsm index d7d78206c28d..6bd16f5d1273 100644 --- a/browser/components/urlbar/UrlbarController.jsm +++ b/browser/components/urlbar/UrlbarController.jsm @@ -593,14 +593,15 @@ class UrlbarController { const selectedResult = this.input.view.selectedResult; if ( !selectedResult || - selectedResult.source != UrlbarUtils.RESULT_SOURCE.HISTORY + selectedResult.source != UrlbarUtils.RESULT_SOURCE.HISTORY || + selectedResult.heuristic ) { return false; } let { queryContext } = this._lastQueryContextWrapper; let index = queryContext.results.indexOf(selectedResult); - if (!index) { + if (index < 0) { Cu.reportError("Failed to find the selected result in the results"); return false; }