If you have to dash to the bathroom or clamp your legs together before you sneeze in the (sometimes unsuccessful) attempt to avoid a leak, you probably have urge urinary incontinence (the sudden, urgent need to urinate)…or stress urinary incontinence (leaking triggered by a sneeze, cough, laughter or exercise)…or a mix of both.

And you probably listened when your doctor told you to cut back on coffee and tea, based on the common belief that caffeine could irritate your bladder and make your problem worse.

But: A new study from Harvard suggests that caffeine may have gotten a bum rap in that regard. So if you’ve been missing your morning jolt of java—not to mention the many health benefits that coffee and tea can impart—take note.

Researchers analyzed food questionnaire data from 21,564 women who had moderate incontinence—defined as leaking one to three times per month—at the start of the study (the “baseline”). They looked at how much caffeine the women had consumed in the four years prior to the study, at baseline and during the two-year follow-up period…and they noted whose incontinence got worse between the start and the end of the study.

Results: No matter how much or how little caffeine the women consumed, and no matter how much their consumption increased or decreased, there seemed to be no effect on their likelihood of experiencing a worsening of their incontinence over time.

This study did not examine the short-term effects of caffeine on urinary habits—for instance, whether downing a mug of joe makes you need to visit the bathroom sooner rather than later. Nor did it look at whether caffeine affects a woman’s risk of developing incontinence in the first place. But the research does bring a measure of relief to women who have worried that indulging their passion for coffee or tea might make their occasional leaks even worse.