Skip to content

Commit

Permalink
Revert normalizeValue change
Browse files Browse the repository at this point in the history
  • Loading branch information
jennypavlova committed Oct 2, 2024
1 parent d7d4372 commit f083497
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import type { Fields } from './types';

export const normalizeValue = <T>(field: unknown[] | unknown): T => {
return (Array.isArray(field) && field.length === 1 ? field[0] : field) as T;
return (Array.isArray(field) && field.length > 0 ? field[0] : field) as T;
};

export const isOptionalFieldDefined = (fields: Fields, fieldToCheck: string): boolean =>
Expand Down

0 comments on commit f083497

Please sign in to comment.