79511893

Date: 2025-03-15 22:46:37
Score: 2
Natty:
Report link

You cannot set the value of a property if it is null or undefined (as indicated by the ?.)

You should check that the property exists first and then set it:

if (statusUpdateRefreshReasonRef.current) {
    statusUpdateRefreshReasonRef.current.value = cloneStatusUpdateClone;
}
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ivo