Don't add filter q if not defined

Otherwise, the backend controller will think we are searching, not filtering, and fail to apply filters.
This commit is contained in:
Alexander Skvortsov 2021-05-12 20:01:04 -04:00
parent 494633537e
commit f9e8c51e76

View File

@ -91,7 +91,9 @@ export default function() {
params.filter.tag = this.params.tags;
// TODO: replace this with a more robust system.
const q = params.filter.q;
params.filter.q = q ? `${q} tag:${this.params.tags}` : '';
if (q) {
params.filter.q = `${q} tag:${this.params.tags}`;
}
}
});
}