File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -187,18 +187,15 @@ angular.module('docsApp.controllers', [])
187187 window . onpopstate = function ( e ) {
188188 resultsResetScroll ( ) ;
189189 $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-
197190 var query = $location . search ( ) . q ;
198191 if ( query ) {
199192 $scope . docFilter = query ;
200193 $scope . query = query ;
201194 $scope . queryModel = query ;
195+ } else {
196+ $scope . docFilter = $location . search ( ) . f || '' ; // Update content
197+ $scope . query = '' ; // Update the sidebar
198+ $scope . queryModel = '' ; // Update the search text
202199 }
203200 } ) ;
204201 }
You can’t perform that action at this time.
0 commit comments