Skip to content

Firefly III: a personal finances manager

Catch errors

James Coled809b7715402
diff --git a/public/v1/js/ff/search/index.js b/public/v1/js/ff/search/index.js
index 5bc8ea32c5..a7d298657c 100644
--- a/public/v1/js/ff/search/index.js
+++ b/public/v1/js/ff/search/index.js
@@ -38,6 +38,10 @@ function searchFailure() {
}
function presentSearchResults(data) {
+ if(typeof data === 'undefined') {
+ searchFailure();
+ return;
+ }
$('.search_ongoing').hide();
$('.search_box').find('.overlay').remove();
$('.search_results').html(data.html).show();