mirror of
https://github.com/stashapp/stash.git
synced 2026-04-21 14:34:16 +02:00
Fix performer tagger gender setting (#2222)
This commit is contained in:
parent
df1478c25d
commit
b527ac5d1f
1 changed files with 4 additions and 1 deletions
|
|
@ -26,11 +26,14 @@ export const genderToString = (value?: GQL.GenderEnum | string) => {
|
|||
export const stringToGender = (
|
||||
value?: string | null,
|
||||
caseInsensitive?: boolean
|
||||
) => {
|
||||
): GQL.GenderEnum | undefined => {
|
||||
if (!value) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const existing = Object.entries(GQL.GenderEnum).find((e) => e[1] === value);
|
||||
if (existing) return existing[1];
|
||||
|
||||
const ret = stringGenderMap.get(value);
|
||||
if (ret || !caseInsensitive) {
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue