Fix search error loop
authorChocobozzz <me@florianbigard.com>
Mon, 15 Jun 2020 12:47:37 +0000 (14:47 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 15 Jun 2020 13:04:51 +0000 (15:04 +0200)
client/src/app/search/search.component.ts

index 0439fdf512b03e54fa50fd8311f6af08b4877b98..eea015c2e5969ce82deb299edd26fac37774a97c 100644 (file)
@@ -148,7 +148,10 @@ export class SearchComponent implements OnInit, OnDestroy {
       },
 
       err => {
-        if (this.advancedSearch.searchTarget !== 'search-index') this.notifier.error(err.message)
+        if (this.advancedSearch.searchTarget !== 'search-index') {
+          this.notifier.error(err.message)
+          return
+        }
 
         this.notifier.error(
           this.i18n('Search index is unavailable. Retrying with instance results instead.'),