Can't ctrl+c to exit a sudo password prompt inside a bash script

I have a script that wouldn't let me ctrl+c out of a sudo password prompt. Just kept asking again & again. I put at the top didSudo="$(sudo pwd)"; & now ctrl+c stops the script. If I enter my password successfully, the rest of my sudo commands work.