Handvask / handvask

Either all code paths should have explicit returns, or none of them JS-0045
Anti-pattern
Minor
a year agoa year old
Expected to return a value at the end of arrow function.
 76    }
 77  }, [dznInstances]);
 78
 79  const solverOptions = useMemo(() => { 80    if (solvers) {
 81      return solvers.map((solver) => {
 82        return { label: solver.name, value: solver.id };
Expected to return a value at the end of arrow function.
 65    }
 66  }, [mznInstances]);
 67
 68  const dznOptions = useMemo(() => { 69    if (dznInstances) {
 70      return dznInstances.map((instance) => {
 71        return {
Expected to return a value at the end of arrow function.
 54  const [flagTimeout, setFlagTimeout] = useState(60);
 55  const [flagMemory, setFlagMemory] = useState(512);
 56
 57  const mznOptions = useMemo(() => { 58    if (mznInstances) {
 59      return mznInstances.map((instance) => {
 60        return {
Arrow function expected no return value.
118                tmp[tmp.findIndex((u) => u.id === user.id)].runs = tmp[
119                  tmp.findIndex((u) => u.id === user.id)
120                ].runs.filter((value) => value.id != run.id);
121                return tmp;122              });
123            }
124          }
Arrow function expected no return value.
 72        const tmp = [...v];
 73        tmp[tmp.findIndex((u) => u.id === user.id)].sys_admin =
 74          user.sys_admin !== null ? null : { id: 2, user: "a" };
 75        return tmp; 76      });
 77    }
 78  }