We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c762a61 + 816d1b8 commit 9bfd635Copy full SHA for 9bfd635
readthedocs/core/static-src/core/js/doc-embed/search.js
@@ -103,7 +103,11 @@ function attach_elastic_search_query(data) {
103
withCredentials: true,
104
},
105
complete: function (resp, status_code) {
106
- if (status_code !== 'success' || resp.responseJSON.count === 0) {
+ if (
107
+ status_code !== 'success' ||
108
+ typeof (resp.responseJSON) === 'undefined' ||
109
+ resp.responseJSON.count === 0
110
+ ) {
111
return search_def.reject();
112
}
113
return search_def.resolve(resp.responseJSON);
0 commit comments