Delete operator on object with optional chaining

Hello. I’m using SonarQube version and got this error:

Remove this “delete” operator or pass an object property to it.

On code like this:

delete initialCampaign[CAMPAIGN_FIELD_NAMES.RATES]?.[0]?.amount;

I think this is a false-positive issue, because if fact the code tries to call delete for an object, but due to optional chaining syntax, Sonar triggered an issue there.

Hey there.

This rule has seen several improvements in the last few versions of SonarQube. Can you check if the issue still exists after a new scan using SonarQube v9.6?