From 4c3fcace5e05998ac0229dbe47dd9742dde1f2de Mon Sep 17 00:00:00 2001 From: Ben Fortune Date: Fri, 30 Jun 2023 16:54:53 +0100 Subject: [PATCH] Fix linting issues --- gui/src/components/Profiles.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gui/src/components/Profiles.tsx b/gui/src/components/Profiles.tsx index 5ed4a6cd..99c03c6c 100644 --- a/gui/src/components/Profiles.tsx +++ b/gui/src/components/Profiles.tsx @@ -34,6 +34,7 @@ export function Profiles(props: ProfilesProps) { // eslint-disable-next-line @typescript-eslint/unbound-method const saveProfile = useStore(state, (s) => s.saveProfile); + // eslint-disable-next-line @typescript-eslint/unbound-method const removeProfile = useStore(state, (s) => s.removeProfile); const profiles = useStore(state, (s) => s.profiles); const highres = useStore(state, (s) => s.highres); @@ -49,9 +50,9 @@ export function Profiles(props: ProfilesProps) { sx={{ width: 200 }} getOptionLabel={(option) => option.name} clearOnBlur - renderOption={(props, option) => ( + renderOption={(optionProps, option) => ( { event.preventDefault(); @@ -80,7 +81,7 @@ export function Profiles(props: ProfilesProps) { )} onChange={(event, value) => { - if (value?.params && doesExist(props.setParams)) { + if (doesExist(value) && doesExist(props.setParams)) { props.setParams({ ...value.params });