only dash once in air but infinite dash on ground

it says it all in the title here is the code

if (isGrounded == false && airdash == true && Input.GetKeyDown(KeyCode.Space))
{
dash();
airdash = false;
}
else if (isGrounded == true && airdash == false)
{
airdash = true;
}
else if (isGrounded == true && airdash==false)
{
dash();
}
else if (isGrounded == false && airdash == false)
{

}

it dosent work the only thing that works was the airdash becomes true on air and false when on the ground and when you dash on air

your 2nd and 3rd are the same condition also they are not trigered by space

if(Input.GetKeyDown(KeyCode.Space))
{
    if (IsGrounded)
    {
        Dash();
        airdash = true;
        return;
    }    
          
    if(airdash)
    {
        Dash();
        airdash = false;
    }          
}