Skip to content

Commit

Permalink
ui: artist/media editor nullify empty fields
Browse files Browse the repository at this point in the history
  • Loading branch information
NextFire committed Aug 24, 2024
1 parent 2601480 commit e807ff3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/ArtistEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default function ArtistEditor(props: {
e.preventDefault();
props.onSubmit({
name: getName(),
additional_names: getAdditionalNames().trim().split("\n"),
additional_names: getAdditionalNames().trim().split("\n") || null,
});
if (props.reset) {
(e.target as HTMLFormElement).reset();
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/MediaEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default function MediaEditor(props: {
props.onSubmit({
media_type: getMediaType(),
name: getName(),
additional_names: getAdditionalNames().trim().split("\n"),
additional_names: getAdditionalNames().trim().split("\n") || null,
});
if (props.reset) {
(e.target as HTMLFormElement).reset();
Expand Down

0 comments on commit e807ff3

Please sign in to comment.