79260382

Date: 2024-12-07 10:03:30
Score: 0.5
Natty:
Report link

this needs explicit type narrowing -

if (typeof result === "object" && !Array.isArray(result)) {
  if (result?.error) {
     log(result.error)
  }
} else {
  if (Array.isArray(result)) {
    setData(result);
  }
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Ranu Vijay