From b22869fa4525678db7e3f55aeea840be006a7b7f Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Fri, 11 Oct 2024 14:47:37 +0200 Subject: [PATCH] Simplify return type --- packages/snaps-simulation/src/interface.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/snaps-simulation/src/interface.ts b/packages/snaps-simulation/src/interface.ts index 6cec7621e6..6933857f83 100644 --- a/packages/snaps-simulation/src/interface.ts +++ b/packages/snaps-simulation/src/interface.ts @@ -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 }; }