Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 54ddca5

Browse files
chore(docs/search): ensure that default search goes to API first
Closes #9736
1 parent 2cd5b4e commit 54ddca5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/app/src/search.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,14 @@ angular.module('search', [])
4141

4242
$scope.submit = function() {
4343
var result;
44-
for(var i in $scope.results) {
45-
result = $scope.results[i][0];
46-
if(result) {
47-
break;
44+
if ($scope.results.api) {
45+
result = $scope.results.api[0];
46+
} else {
47+
for(var i in $scope.results) {
48+
result = $scope.results[i][0];
49+
if(result) {
50+
break;
51+
}
4852
}
4953
}
5054
if(result) {

0 commit comments

Comments
 (0)