Similarly when a shot is off target and the commentator says "if that was on target, that would have been a goal", makes no sense because you are completely changing where the ball is and thus it has nothing to do with the shot.
Depends where about on target it went "if that had not been blocked and been on target and out of the reach of the goalkeeper, that would have been a goal" would suffice.