Merge pull request #554 from Zagrios/bugfix/542/exclude-tag-result-in-javascript-error

[bugfix-542] Fix crash when exclude map tag when browsing for new maps
This commit is contained in:
MathieuG-P
2024-08-10 15:37:55 +02:00
committed by GitHub
@@ -35,7 +35,8 @@ export class BeatSaverApiService {
const enbledTagsString = filter.enabledTags ? Array.from(filter.enabledTags) : null;
const excludedTagsString = filter.excludedTags ? Array.from(filter.excludedTags).map(tag => `!${tag}`) : null;
const tags = enbledTagsString || excludedTagsString ? [...enbledTagsString, excludedTagsString].join("|") : null;
let tags = [...(enbledTagsString ?? []), ...(excludedTagsString ?? [])].join("|");
tags = tags.length > 0 ? tags : null;
const params: Record<string, string> = this.objectToStringRecord({...filter, tags});