Skip to content

Commit

Permalink
Remove unncessary null check
Browse files Browse the repository at this point in the history
  • Loading branch information
reyraa committed Jul 27, 2023
1 parent 599938c commit 89043b4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/CreateCollection/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CreateCollection = () => {
const onSubmit = async (data: Record<string, any>) => {

Check warning on line 29 in app/components/CreateCollection/index.tsx

View workflow job for this annotation

GitHub Actions / build (16.5.0)

Unexpected any. Specify a different type
await signAndBroadcast(data);
};
const errorMessage = formState.errors && (Object.values(formState.errors)[0]?.message as string);
const errorMessage = (Object.values(formState.errors)[0]?.message as string);
const formError = errorMessage
? {
message: errorMessage,
Expand Down
2 changes: 1 addition & 1 deletion app/components/EditProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const ProfileEdit = ({ data }: ProfileEditProps) => {
const onSubmit = async (formValues: Record<string, unknown>) => {
await signAndBroadcast(formValues, data);
};
const errorMessage = formState.errors && (Object.values(formState.errors)[0]?.message as string);
const errorMessage = (Object.values(formState.errors)[0]?.message as string);
const formError = errorMessage
? {
message: errorMessage,
Expand Down
2 changes: 1 addition & 1 deletion app/hooks/useCreateEntity/useCreateProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const useCreateProfile = () => {
{ key: SUFFIXES.profile.secondary, value: (formValues.banner as File[])[0] },
];
// @todo React upon upload failure
await uploadFiles(profile?.profileID ?? result.entityID as string, files);
await uploadFiles(profile.profileID ?? result.entityID as string, files);
return setBroadcastStatus({ ...result, loading: false });
};

Expand Down

0 comments on commit 89043b4

Please sign in to comment.