Skip to content

Commit

Permalink
Add await to calls to async functions
Browse files Browse the repository at this point in the history
  • Loading branch information
markborkum committed Mar 4, 2025
1 parent 985d15a commit 5b95e81
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/checkbox_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const CheckboxWrapper: React.FC<CheckboxWrapperProps> = ({
<Checkbox
label={label}
options={options}
onChange={async value => upsertData(path, value)}
onChange={async value => await upsertData(path, value)}
value={
(doc && get(doc.data_, path)) ?? default_value ?? []
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/date_input_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const DateInputWrapper: React.FC<DateInputWrapperProps> = ({ label, path }) => {
<DateInput
label={label}
value={doc && get(doc.data_, path)}
onChange={async value => upsertData(path, value)}
onChange={async value => await upsertData(path, value)}
/>
)
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/file_input_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const FileInputWrapper: React.FC<FileInputWrapperProps> = ({
file={attachment?.data as Blob}
fileMetadata={attachmentMetadata}
upsertFile={async (blob, filename) =>
putAttachment(id, blob, filename)
await putAttachment(id, blob, filename)
}
>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/components/installation_select_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const InstallationSelect: React.FC<InstallationSelectProps> = ({
options={options}
value={doc && get(doc.data_, path)}
onChange={async value =>
upsertData(path, value)
await upsertData(path, value)
}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/number_input_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const NumberInputWrapper: React.FC<NumberInputWrapperProps> = ({
max={max}
step={step}
hint={hint}
onChange={async value => upsertData(path, value)}
onChange={async value => await upsertData(path, value)}
/>
)
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/radio_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const RadioWrapper: React.FC<RadioWrapperProps> = ({
<Radio
label={label}
options={options}
onChange={async value => upsertData(path, value)}
onChange={async value => await upsertData(path, value)}
value={doc && get(doc.data_, path)}
/>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/select_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const SelectWrapper: React.FC<SelectWrapperProps> = ({
label={label}
options={options}
value={doc && get(doc.data_, path)}
onChange={async value => upsertData(path, value)}
onChange={async value => await upsertData(path, value)}
/>
)
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/string_input_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const StringInputWrapper: React.FC<StringInputWrapperProps> = ({
max={max}
regexp={regexp}
hint={hint}
onChange={async value => upsertData(path, value)}
onChange={async value => await upsertData(path, value)}
/>
)
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/text_input_wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const TextInputWrapper: React.FC<TextInputWrapperProps> = ({
max={max}
regexp={regexp}
placeholder={placeholder}
onChange={async value => upsertData(path, value)}
onChange={async value => await upsertData(path, value)}
/>
)
}}
Expand Down

0 comments on commit 5b95e81

Please sign in to comment.