function loop() without body.

I was uploading a sketch to my Arduino Leonardo, and I realized that I declared the loop function like this:

void loop () {

The IDE compiled the sketch and uploaded on the card successfully but when I connect the Arduino to my computer the LED 13 blinks a few times and then the computer generates an error saying that USB is not responding.

The IDE don’t recognizes the card, so I can’t upload new sketches to my Arduino. I tried to connect it to Windows and Linux but still not recognized.
I need help, how I can fix this?

Thank you!

I do that all the time, something else must be happening