I wear prescription glasses under my helmet and usually that fogs before the visor itself. I've been carrying some of those treated ski goggle wipes with me in winter. I wipe to glasses prior to putting on my helmet and it seems to help with the fogging issues.
https://www.amazon.com/Scott-Sports-205179-223-No-Fog-Cloth/dp/B003AZJIV4
https://www.amazon.com/Scott-Sports-205179-223-No-Fog-Cloth/dp/B003AZJIV4