Skip to content

Commit

Permalink
Simplify return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrtenz committed Oct 11, 2024
1 parent 82fcd40 commit b22869f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/snaps-simulation/src/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,10 @@ function getFormElement(form: FormElement, name: string) {
* @param element - The JSX element.
* @returns An object containing the element and optional form.
*/
function getElementWithOptionalForm(element: NamedJSXElement):
| {
element: NamedJSXElement;
form?: string;
}
| undefined {
function getElementWithOptionalForm(element: NamedJSXElement): {
element: NamedJSXElement;
form?: string;
} {
if (element.type !== 'Button' || !element.props.form) {
return { element };
}
Expand Down

0 comments on commit b22869f

Please sign in to comment.