From 6eb39177684ce132b574fe29a5441ee6135e114e Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 2 Oct 2024 14:10:39 +0200 Subject: [PATCH] Fix two new linting errors --- src/components/Form/Controls/EditInPlace/EditInPlace.tsx | 2 +- src/components/Separator/Separator.tsx | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/Form/Controls/EditInPlace/EditInPlace.tsx b/src/components/Form/Controls/EditInPlace/EditInPlace.tsx index 3ed5c567..7b76c731 100644 --- a/src/components/Form/Controls/EditInPlace/EditInPlace.tsx +++ b/src/components/Form/Controls/EditInPlace/EditInPlace.tsx @@ -264,7 +264,7 @@ export const EditInPlace = forwardRef( saveButtonRef.current?.blur(); await onSave?.(e); dispatch(Event.Saved); - } catch (e) { + } catch { // We don't really need to do anything here, we just don't want to display the // 'saved' label, obviously. The user of the component can update the error to // show what failed. diff --git a/src/components/Separator/Separator.tsx b/src/components/Separator/Separator.tsx index 5a5b3ece..c2027ed4 100644 --- a/src/components/Separator/Separator.tsx +++ b/src/components/Separator/Separator.tsx @@ -65,9 +65,11 @@ export const Separator = forwardRef( useEffect(() => { const style = ourRef.current?.style; - spacing - ? style?.setProperty(SPACING_CUSTOM_PROP, spacing) - : style?.removeProperty(SPACING_CUSTOM_PROP); + if (spacing) { + style?.setProperty(SPACING_CUSTOM_PROP, spacing); + } else { + style?.removeProperty(SPACING_CUSTOM_PROP); + } }, [spacing]); return (