We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ec101c3 + 804c228 commit 32116d2Copy full SHA for 32116d2
app/scripts/controllers.js
@@ -187,18 +187,15 @@ angular.module('docsApp.controllers', [])
187
window.onpopstate = function( e ) {
188
resultsResetScroll();
189
$scope.$apply(function() {
190
- var filter = $location.search().f;
191
- if ( filter ) {
192
- $scope.docFilter = filter; // Update content
193
- $scope.query = ''; // Update the sidebar
194
- $scope.queryModel = ''; // Update the search text
195
- }
196
-
197
var query = $location.search().q;
198
if ( query ) {
199
$scope.docFilter = query;
200
$scope.query = query;
201
$scope.queryModel = query;
+ } else {
+ $scope.docFilter = $location.search().f || ''; // Update content
+ $scope.query = ''; // Update the sidebar
+ $scope.queryModel = ''; // Update the search text
202
}
203
});
204
0 commit comments