How to send null in formData

How to send null in formData

Hi,

I have the following line:

  1. if (Savanna.loggedon === true) formData.append("savanna_account", Savanna.savanna_account); else formData.append("savanna_account", null);

I need when the Savanna.loggedon is not true to make the savanna_account null so I can save it as null in MySQL

But currently when the loggedon is not true then the savanna_account is passed as 0 ( ZERO )

How can I fix this please?


Thanks,
Jassim