Yes when you have asthma your immune system that fights off infections and viruses is weakened and compromised.
Asthma can also cause lung damage which then lets in bacteria and other viruses into the body and then since your immune system is weakened it's harder for your body to fight off infections and viruses which make it harder for you to get over the infection or viruses.