caverav / auditforge

Detected using a non-null assertion after an optional chain expression JS-0338
Anti-pattern
Major
1 occurrence in this check
Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong
222  const handleSubmitAddCollab = async () => {
223    const updatedCollaborator: NewCollaborator = {
224      ...newCollaborator!,
225      role: selectedRole?.value!,226    };
227
228    let isValid = true;