exclude byobu from elastic for now

This commit is contained in:
Daniel Klabbers 2021-11-11 13:12:36 +01:00
parent cc9c57308e
commit 5600236bb8
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,9 @@ export default function extendDiscussionState() {
override(DiscussionListState.prototype, 'loadPage', async function (this: DiscussionListState, original, page: number = 1) {
const preloaded = app.data.apiDocument || null;
// If this is not the usual index, make sure to fallback to the native page (eg for byobu).
if (app.current.get('routeName') !== 'index') return original.call(this, page);
// If existing payload is given or no search is made, fallback on native page.
if (preloaded || !this.requestParams()?.filter?.q) return original.call(this, page);
const params = this.requestParams();