79253656

Date: 2024-12-05 07:00:38
Score: 0.5
Natty:
Report link

Turns out the solution is simple. Do not destructure within the parameter list.

Destructure AFTER you have narrowed the typing such as using an if else block:

if (props.multipleSelection === true){
//destructure here
} else {
//destructure here
}
Reasons:
  • Whitelisted phrase (-1): solution is
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user28586336